maven-checkstyle-plugin neglects to scan src/test/..*.java
Andrew Pennebaker <[email protected]> Mon, 7 Oct 2013 10:45:30 -0400
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <CAC7GPxa9FL8HCUHe7MJOCdb5VNUtNviqtG5THCEfdfRffLFp3w@mail.gmail.com> |
--===============5468028688097183645== Content-Type: multipart/alternative; boundary=001a11c28c4c25d19c04e827b480 --001a11c28c4c25d19c04e827b480 Content-Type: text/plain; charset=ISO-8859-1 I would like to enforce a rule of no star imports across all Java files, including jUnit tests. If I use a star import in a src/main/..*.java file, Checkstyle correctly reports: $ mvn checkstyle:checkstyle ... Using the '.*' form of import should be avoided - java.net.*. ... However, if I use a star import in src/test/..*.java, Checkstyle reports no such error. $ mvn checkstyle:checkstyle ... [INFO] Starting audit... Audit done. ... * Is there a maven-checkstyle-plugin rule that can add src/test/**/*.java to the list of locations to scan? * Could the next version of maven-checkstyle-plugin check this location by default? --001a11c28c4c25d19c04e827b480 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>I would like to enforce a rule of no star imports acr= oss all Java files, including jUnit tests. If I use a star import in a src/= main/..*.java file, Checkstyle correctly reports:</div><div><br></div><div> $ mvn checkstyle:checkstyle<br></div><div>...</div><div>Using the '.*&#= 39; form of import should be avoided - java.net.*.</div><div>...</div><div>= <br></div><div>However, if I use a star import in src/test/..*.java, Checks= tyle reports no such error.</div> <div><br></div><div>$ mvn checkstyle:checkstyle<br></div><div>...</div><div= >[INFO] Starting audit...</div><div>Audit done.</div><div>...</div><div><br= ></div><div>* Is there a maven-checkstyle-plugin rule that can add src/test= /**/*.java to the list of locations to scan?</div> <div>* Could the next version of maven-checkstyle-plugin check this locatio= n by default?</div></div> --001a11c28c4c25d19c04e827b480-- --===============5468028688097183645== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk --===============5468028688097183645== 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 --===============5468028688097183645==--