Checking for improperly namespaced code?
Andrew Pennebaker <[email protected]> Wed, 6 Nov 2013 11:29:07 -0500
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <CAC7GPxZbs0+zzyFY0DZjxWUTjVC05MCtDg9D4Z0Sd0C2-=GVsQ@mail.gmail.com> |
--===============2339734713865681370== Content-Type: multipart/alternative; boundary=001a11c2833af76f7704ea84a56d --001a11c2833af76f7704ea84a56d Content-Type: text/plain; charset=ISO-8859-1 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] --001a11c2833af76f7704ea84a56d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Improperly namespaced code is giving our Windows deve= lopers trouble, but we don't know which code is to blame, as most of ou= r developers use Mac, whose version of javac allows improper namespaces.</d= iv> <div><br></div>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/. Windo= ws javac fails when encountering such a discrepancy.<div><br></div><div> 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= .</div><div><br></div><div>Our codebase is getting too large to check each = package declaration manually. Is there was a way to configure checkstyle.xm= l and/or maven-checkstyle-plugin to report improper namespacing, when packa= ge declarations don't match up with the actual directory structure?<div= > <div><div><br></div>-- <br><div dir=3D"ltr">Cheers,<div><br><div>Andrew Pen= nebaker</div><div><a href=3D"mailto:[email protected]" target=3D"_blank= ">[email protected]</a></div></div></div> </div></div></div></div> --001a11c2833af76f7704ea84a56d-- --===============2339734713865681370== 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 --===============2339734713865681370== 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 --===============2339734713865681370==--