-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from Vodorok/master
Checkstyle plugin now runs with build.
- Loading branch information
Showing
7 changed files
with
128 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Checkstyle for CodeChecker Eclipse plugin | ||
|
||
## Maven | ||
### Usage | ||
Maven is configured to automatically run checksytle plugin during the build, no other action is needed. The current configuration won't fail the build, only emit warnings. | ||
|
||
__Adhering to to these style checks is mandatory.__ | ||
|
||
In the future the the severity level will be changed to error, and will fail the build. | ||
|
||
The `checkstyle.xml` file that defines the checks to be used is under `/eclipse-plugin/eclipse/cc.codechecker.eclipse.parent/` | ||
|
||
The Maven checkstyle plugin also configured in this folders pom.xml under the build section. | ||
|
||
## Eclipse IDE | ||
|
||
* ### Installation: | ||
* Install`Checkstyle Plug-in` from Eclipse marketplace. | ||
|
||
* ### Confugration: | ||
* To configure Checkstyle plug-in go to `preferences > Checkstyle`. | ||
* Add the checkstyle.xml with `new` as an `External configuration file`, and specify a name also. | ||
![Config Pages][conf] | ||
* _This step is optional:`Set as Default` the new configuration_ | ||
* Under the project preferences tick `Checkstyle active for this project` | ||
and make sure that the __configuration you added__ is being used. | ||
![Config Pages][projconf] | ||
|
||
* ### Usage: | ||
* Checkstyle automatically monitors the project for imperfections. | ||
* The lines containing checkstyle problems are yellowed. | ||
* There is a view (Checkstyle violations) that can be opened. | ||
* There is a right click context item. (Apply Checkstyle fixes). | ||
|
||
## Codacy | ||
|
||
[Codacy](https://app.codacy.com/project/CodeChecker/CodeCheckerEclipsePlugin/dashboard) is set to use the same checkers as the project. | ||
|
||
[conf]: img/checkstyle/ide_config.png "Configuration" | ||
[projconf]: img/checkstyle/ide_proj_conf.png "Project Configuration" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions
61
eclipse-plugin/eclipse/cc.codechecker.eclipse.parent/checkstyle.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" | ||
"https://checkstyle.org/dtds/configuration_1_3.dtd"> | ||
|
||
|
||
<module name="Checker"> | ||
<property name="severity" value="warning"/> | ||
<module name="TreeWalker"> | ||
<module name="AvoidStarImport"/> | ||
<module name="AvoidStaticImport"/> | ||
<module name="ConstantName"/> | ||
<module name="DeclarationOrder"/> | ||
<module name="DefaultComesLast"/> | ||
<module name="EmptyBlock"/> | ||
<module name="EmptyCatchBlock"/> | ||
<module name="EmptyStatement"/> | ||
<module name="EqualsAvoidNull"/> | ||
<module name="EqualsHashCode"/> | ||
<module name="ExplicitInitialization"/> | ||
<module name="FallThrough"/> | ||
<module name="GenericWhitespace"/> | ||
<module name="HideUtilityClassConstructor"/> | ||
<module name="IllegalCatch"/> | ||
<module name="IllegalImport"/> | ||
<module name="IllegalInstantiation"/> | ||
<module name="IllegalThrows"/> | ||
<module name="IllegalToken"/> | ||
<module name="IllegalTokenText"/> | ||
<module name="IllegalType"/> | ||
<module name="ImportOrder"> | ||
<property name="groups" value="/^javax?\./,org,com"/> | ||
<property name="ordered" value="true"/> | ||
<property name="separated" value="true"/> | ||
<property name="option" value="above"/> | ||
<property name="sortStaticImportsAlphabetically" value="true"/> | ||
</module> | ||
<module name="Indentation"/> | ||
<module name="InnerAssignment"/> | ||
<module name="JavadocMethod"/> | ||
<module name="JavadocStyle"/> | ||
<module name="JavadocType"/> | ||
<module name="LocalVariableName"/> | ||
<module name="MagicNumber"/> | ||
<module name="MemberName"/> | ||
<module name="MethodCount"/> | ||
<module name="MethodName"/> | ||
<module name="MissingSwitchDefault"/> | ||
<module name="ModifiedControlVariable"/> | ||
<module name="ModifierOrder"/> | ||
<module name="MultipleStringLiterals"/> | ||
<module name="MultipleVariableDeclarations"/> | ||
<module name="MutableException"/> | ||
<module name="SimplifyBooleanExpression"/> | ||
<module name="SimplifyBooleanReturn"/> | ||
<module name="SuperClone"/> | ||
<module name="UnusedImports"/> | ||
<module name="VariableDeclarationUsageDistance"/> | ||
</module> | ||
<module name="JavadocPackage"/> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.