If you're not a hyper beginner, you shouldn't wonder too much ... Checkstyle was a good idea.
When I was looking at the Java source, I found something like this.
//CHECKSTYLE:OFF Java code //CHECKSTYLE:ON
What? this? Was the beginning.
CHECKSTYLE: OFFturns off Checkstyle.
When I went around with "Java CHECKSTYLE: OFF", it felt good from the first case.
There was also a description in checkstye.xml in my project as described on the page!
<module name="Checker"> <property name="severity" value="warning"/> <module name="TreeWalker"> <module name="FileContentsHolder"/> <module name="JavadocMethod"> <abridgement> <module name="SuppressionCommentFilter"/> <module name="SuppressWithNearbyCommentFilter"> <property name="commentFormat" value="CHECKSTYLE IGNORE THIS LINE"/> </module> </module>
So "CHECKSTYLE: OFF" is ...
You can suppress Checkstyle warnings by writing comments in your code.
System.out.println(123); // CHECKSTYLE IGNORE THIS LINEFurthermore, if you want to suppress over a range of several lines, you can also write:
// CHECKSTYLE:ONCase of daringly breaking the rules (Checkstyle warning suppression) --Tomoto Daisuke IT-PRESS
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard. checkstyle – Checkstyle 8.1
You can check during program creation (Just In Time). When running on Eclipse, the check is performed every time a file is edited or added. This allows you to correct mistakes immediately after writing the code. Catalog of test tools that can be used in Eclipse (2): Static analysis tools that can be used in Eclipse-@IT
There are many coding standards in the world, but it seems that you can make your own coding standards for checking.