Re: Checking for improperly namespaced code?
Andrew Pennebaker <[email protected]> Wed, 6 Nov 2013 13:22:59 -0500
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <CAC7GPxYy9i1r_oU8WcWWggNiXtc9yQLiB0=iEeZ-M=EBy597bw@mail.gmail.com> |
--===============1602009591336262053== Content-Type: multipart/alternative; boundary=001a11c274d826937004ea863d06 --001a11c274d826937004ea863d06 Content-Type: text/plain; charset=ISO-8859-1 A bash script is not a bad idea. Though it would be better to have something platform independent to help Windows developers. Maybe a Java program. Best would be checkstyle rule. On Wed, Nov 6, 2013 at 11:39 AM, <[email protected]> wrote: > Write a bash script? > > > > *From:* Andrew Pennebaker [mailto:[email protected]] > *Sent:* 06 November 2013 16:29 > *To:* Checkstyle Users > *Subject:* [Checkstyle-user] Checking for improperly namespaced code? > > > > Improperly namespaced code is giving our Windows developers trouble, but > we don't know which code is to blame, as most of our developers use Mac, > whose version of javac allows improper namespaces. > > > > E.g., Mac javac allows package *org*.blah.blah.blah; in .java files that > reside in src/main/java/*com*/blah/blah/blah/. Windows javac fails when > encountering such a discrepancy. > > > > This leads to much confusion and tearing of hair, as there is much code on > our Macs that will fail to compile when we eventually try it out in Windows. > > > > Our codebase is getting too large to check each package declaration > manually. Is there was a way to configure checkstyle.xml and/or > maven-checkstyle-plugin to report improper namespacing, when package > declarations don't match up with the actual directory structure? > > > > -- > > Cheers, > > > > Andrew Pennebaker > > [email protected] > > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. > Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and > register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > > -- Cheers, Andrew Pennebaker [email protected] --001a11c274d826937004ea863d06 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">A bash script is not a bad idea.<div><br></div><div>Though= it would be better to have something platform independent to help Windows = developers. Maybe a Java program. Best would be checkstyle rule.</div></div= > <div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Wed, Nov 6= , 2013 at 11:39 AM, <span dir=3D"ltr"><<a href=3D"mailto:adrian.p.smith= @bt.com" target=3D"_blank">[email protected]</a>></span> wrote:<br><= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"> <div lang=3D"EN-GB" link=3D"blue" vlink=3D"purple"><div><p class=3D"MsoNorm= al"><span style=3D"font-family:"Arial","sans-serif";col= or:blue">Write a bash script?<u></u><u></u></span></p><p class=3D"MsoNormal= "><span style=3D"font-family:"Arial","sans-serif";color= :blue"><u></u>=A0<u></u></span></p> <p class=3D"MsoNormal"><b><span lang=3D"EN-US" style=3D"font-size:10.0pt;fo= nt-family:"Tahoma","sans-serif"">From:</span></b><span = lang=3D"EN-US" style=3D"font-size:10.0pt;font-family:"Tahoma",&qu= ot;sans-serif""> Andrew Pennebaker [mailto:<a href=3D"mailto:apennebak= [email protected]" target=3D"_blank">[email protected]</a>] <br> <b>Sent:</b> 06 November 2013 16:29<br><b>To:</b> Checkstyle Users<br><b>Su= bject:</b> [Checkstyle-user] Checking for improperly namespaced code?<u></u= ><u></u></span></p><div><div class=3D"h5"><p class=3D"MsoNormal"><u></u>=A0= <u></u></p> <div><div><p class=3D"MsoNormal">Improperly namespaced code is giving our W= indows developers trouble, but we don't know which code is to blame, as= most of our developers use Mac, whose version of javac allows improper nam= espaces.<u></u><u></u></p> </div><div><p class=3D"MsoNormal"><u></u>=A0<u></u></p></div><p class=3D"Ms= oNormal">E.g., Mac javac allows package <b>org</b>.blah.blah.blah; in .java= files that reside in src/main/java/<b>com</b>/blah/blah/blah/. Windows jav= ac fails when encountering such a discrepancy.<u></u><u></u></p> <div><p class=3D"MsoNormal"><u></u>=A0<u></u></p></div><div><p class=3D"Mso= Normal">This leads to much confusion and tearing of hair, as there is much = code on our Macs that will fail to compile when we eventually try it out in= Windows.<u></u><u></u></p> </div><div><p class=3D"MsoNormal"><u></u>=A0<u></u></p></div><div><p class= =3D"MsoNormal">Our codebase is getting too large to check each package decl= aration manually. Is there was a way to configure checkstyle.xml and/or mav= en-checkstyle-plugin to report improper namespacing, when package declarati= ons don't match up with the actual directory structure?<u></u><u></u></= p> <div><div><div><p class=3D"MsoNormal"><u></u>=A0<u></u></p></div><p class= =3D"MsoNormal">-- <u></u><u></u></p><div><p class=3D"MsoNormal">Cheers,<u><= /u><u></u></p><div><p class=3D"MsoNormal"><u></u>=A0<u></u></p><div><p clas= s=3D"MsoNormal"> Andrew Pennebaker<u></u><u></u></p></div><div><p class=3D"MsoNormal"><a hre= f=3D"mailto:[email protected]" target=3D"_blank">[email protected]<= /a><u></u><u></u></p></div></div></div></div></div></div></div></div></div>= </div> </div><br>-----------------------------------------------------------------= -------------<br> November Webinars for C, C++, Fortran Developers<br> Accelerate application performance with scalable programming models. Explor= e<br> techniques for threading, error checking, porting, and tuning. Get the most= <br> from the latest Intel processors and coprocessors. See abstracts and regist= er<br> <a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D60136231&iu= =3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net/gam= pad/clk?id=3D60136231&iu=3D/4140/ostg.clktrk</a><br>___________________= ____________________________<br> Checkstyle-user mailing list<br> <a href=3D"mailto:[email protected]">Checkstyle-user@li= sts.sourceforge.net</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/checkstyle-user" ta= rget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/checkstyle-use= r</a><br> <br></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div dir= =3D"ltr">Cheers,<div><br><div>Andrew Pennebaker</div><div><a href=3D"mailto= :[email protected]" target=3D"_blank">[email protected]</a></div></= div> </div> </div> --001a11c274d826937004ea863d06-- --===============1602009591336262053== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk --===============1602009591336262053== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user --===============1602009591336262053==--