Re: Checking for improperly namespaced code?

<[email protected]> Wed, 6 Nov 2013 16:39:40 +0000
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <555F5D0F9437EB4EB0E1828E3A2719393720A606D0@EMV65-UKRD.domain1.systemhost.net>
--===============2015117080220719097==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_555F5D0F9437EB4EB0E1828E3A2719393720A606D0EMV65UKRDdoma_"

--_000_555F5D0F9437EB4EB0E1828E3A2719393720A606D0EMV65UKRDdoma_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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, whos=
e version of javac allows improper namespaces.

E.g., Mac javac allows package org.blah.blah.blah; in .java files that resi=
de in src/main/java/com/blah/blah/blah/. Windows javac fails when encounter=
ing 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 manuall=
y. Is there was a way to configure checkstyle.xml and/or maven-checkstyle-p=
lugin to report improper namespacing, when package declarations don't match=
 up with the actual directory structure?

--
Cheers,

Andrew Pennebaker
[email protected]<mailto:[email protected]>

--_000_555F5D0F9437EB4EB0E1828E3A2719393720A606D0EMV65UKRDdoma_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Arial","sans-serif";
	color:blue;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-GB link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span style=3D'f=
ont-family:"Arial","sans-serif";color:blue'>Write a bash script?<o:p></o:p>=
</span></p><p class=3DMsoNormal><span style=3D'font-family:"Arial","sans-se=
rif";color:blue'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>F=
rom:</span></b><span lang=3DEN-US style=3D'font-size:10.0pt;font-family:"Ta=
homa","sans-serif"'> Andrew Pennebaker [mailto:[email protected]] <br><=
b>Sent:</b> 06 November 2013 16:29<br><b>To:</b> Checkstyle Users<br><b>Sub=
ject:</b> [Checkstyle-user] Checking for improperly namespaced code?<o:p></=
o:p></span></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=
=3DMsoNormal>Improperly namespaced code is giving our Windows developers tr=
ouble, but we don't know which code is to blame, as most of our developers =
use Mac, whose version of javac allows improper namespaces.<o:p></o:p></p><=
/div><div><p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p class=3DMsoNor=
mal>E.g., Mac javac allows package <b>org</b>.blah.blah.blah; in .java file=
s that reside in src/main/java/<b>com</b>/blah/blah/blah/. Windows javac fa=
ils when encountering such a discrepancy.<o:p></o:p></p><div><p class=3DMso=
Normal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal>This leads to m=
uch confusion and tearing of hair, as there is much code on our Macs that w=
ill fail to compile when we eventually try it out in Windows.<o:p></o:p></p=
></div><div><p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=
=3DMsoNormal>Our codebase is getting too large to check each package declar=
ation manually. Is there was a way to configure checkstyle.xml and/or maven=
-checkstyle-plugin to report improper namespacing, when package declaration=
s don't match up with the actual directory structure?<o:p></o:p></p><div><d=
iv><div><p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><p class=3DMsoNorma=
l>-- <o:p></o:p></p><div><p class=3DMsoNormal>Cheers,<o:p></o:p></p><div><p=
 class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal>Andrew Pe=
nnebaker<o:p></o:p></p></div><div><p class=3DMsoNormal><a href=3D"mailto:ap=
[email protected]" target=3D"_blank">[email protected]</a><o:p></o:p>=
</p></div></div></div></div></div></div></div></div></body></html>=

--_000_555F5D0F9437EB4EB0E1828E3A2719393720A606D0EMV65UKRDdoma_--


--===============2015117080220719097==
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
--===============2015117080220719097==
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

--===============2015117080220719097==--