maven-checkstyle-plugin neglects to scan src/test/..*.java

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

maven-checkstyle-plugin neglects to scan src/test/..*.java

Andrew Pennebaker
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?

------------------------------------------------------------------------------
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
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: maven-checkstyle-plugin neglects to scan src/test/..*.java

Roman Ivanov
Hi, Andrew Pennebaker

your are at wrong mail-list,
Maven plugin is developerd by other team - http://maven.apache.org/plugins/maven-checkstyle-plugin/issue-tracking.html.

For you problem:
http://maven.apache.org/plugins/maven-checkstyle-plugin/check-mojo.html
Please pay attention to option - includeTestSourceDirectory

thanks,
Roman Ivanov
------------------------------------------------------------------------------
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=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user