method One:
1.Eclipse, select Help->software updates->find and Install
2. Select Search for new features to install select Next 3. Select New Remote Site
4. Enter the update addresshttp://eclipse-cs.sourceforge.net/update
5. Restart after installation Method Two:
1. Download the Eclipse plugin
http://sourceforge.net/projects/eclipse-cs/
after downloading, the two folders inside plugins and features are copied to the corresponding plugins and features directories under the Eclipse directory respectively .
2. If you just start eclipse directly, you may get classnotfoundexceptions and other errors, so you must add a parameter-clean when you start eclipse. This allows eclipse to update many of the plug-in information it currently installslike you had eclipse on D, and that was D:\eclipse\eclipse.exe-clean. CheckStyle Use
Select the project, right-click Checkstyle->check code with Checkstyle, check for errors
result output of Checkstyle
ordinal output content meaning1 type is missing a Javadoc commentclass missing types Description2 "{" Should is on the previous line "{" should be in the previous row3Methos is missing a Javadoc comment method is missing Javadoc comment before4Expected @throws tag for "Exception" in comments want @throws description5 "." is preceeded with whitespace "." No spaces in front6 "." is followed by whitespace "." Cannot have spaces after7 "=" is not preceeded with whitespace "=" space is missing before8 "=" is not followed with whitespace "=" after space is missing9 "}" should is on the same line "}" should be in the same row as the next statement10Unused @param tag for "unused" without parameter "unused", no comment required11Variable "Ca" missing Javadoc variable "CA" missing Javadoc comment12Line longer than 80characters line length exceeds13Line contains a tab character line contains the "tab" character14Redundant "public" modifier redundant "public" modifier15Final modifier out of order with the JSL suggestionfinal modifier sequence error16Avoid using the ". *" form of importimport format avoids using ". *"17Redundant Import from the same pack import content from the same package18Unused import-java.util.listimport come in java.util.list not used19Duplicate Import to line 13 duplicate import same content20Import from illegal packages import content from an illegal package' While ' construct must use ' {} ' while ' statement is missing ' {} '22Variable "STest1" must be private and has accessor method variable "STest1" should be private, and there are methods to call it23Variable "ABC" must match pattern "^[a-z][a-za-z0-9]*$" variable "abc" does not conform to the naming convention "^[a-z][a-za-z0-9]*$""Is followed by whitespace" ("cannot have space after") "is proceeded by whitespace") "cannot have spaces before
How to install the Eclipse Checkstyle plugin