-
Oct 15th, 2009, 12:56 AM
#1
Annotations breaking checkstyles 5.0
Hi, We use checkstyle 5.0 to ensure the code quality in our projects. I recently tried using the request mapping annotations for controllers. Something like "@RequestMapping(value="/{accountNumber}", method = RequestMethod.GET)". This is resulting in a checkstyle issue with the WhitespaceAround module. Any ideas?
-
Oct 15th, 2009, 10:34 AM
#2
Stop using Checkstyle? Code quality is not ensured by formatting conventions.
-
Oct 16th, 2009, 05:21 AM
#3
As a department standard we have to use checkStyle for all our java projects, so there is not much choice there. Is there a better tool out there which you can suggest?
-
Oct 16th, 2009, 10:11 AM
#4
This is out of scope of Spring, but I would suggest a few things.
First, none of these tools should be taken out of the box as "the standard", and the ultimate goal should be readable and maintainable quality code, not adherence to a "standard".
The PMD tool gives you the flexibility to compose a custom ruleset, aggregating all the rules that the team considers relevant, in addition to specifying whether the violation flags an error or a warning (some rules should just be SHOULDs and not MUSTs). Not to mention the ability to construct your own custom rules, from either XPath specifications or Java code using their AST API.
Both PMD and Findbugs concentrate less on formatting questions, and more on real design issues in the code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules