-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copying checkstyle to VIVO repository
- Loading branch information
Showing
3 changed files
with
118 additions
and
2 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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE suppressions PUBLIC | ||
"-//Puppy Crawl//DTD Suppressions 1.2//EN" | ||
"http://checkstyle.sourceforge.net/dtds/suppressions_1_2.dtd"> | ||
<suppressions> | ||
|
||
</suppressions> |
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,109 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | ||
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> | ||
<!-- | ||
Vitro CodeStyle Requirements | ||
1. 4-space indents for Java. NO TABS ALLOWED. | ||
2. One true brace style. Braces required on all blocks. | ||
3. Do not use wildcard imports (e.g. import java.util.*). Duplicated or unused imports also not allowed. | ||
4. Maximum line length is 100 characters (except for long URLs, packages or imports) | ||
5. No trailing spaces allowed (except in comments) | ||
6. Tokens should be surrounded by whitespace (see http://checkstyle.sourceforge.net/config_whitespace.html#WhitespaceAround) | ||
7. Each line of code can only include one statement. This also means each variable declaration must be on its own line | ||
8. Each source file must include our license header (validated separately by license-maven-plugin, see pom.xml) | ||
For more information on CheckStyle configurations below, see: http://checkstyle.sourceforge.net/checks.html | ||
--> | ||
<module name="Checker"> | ||
<!-- Configure checker to use UTF-8 encoding --> | ||
<property name="charset" value="UTF-8"/> | ||
<!-- Configure checker to run on files with these extensions --> | ||
<property name="fileExtensions" value="java, properties, cfg, xml, js, ftl, ttl, n3"/> | ||
|
||
<!-- <!– Suppression configurations in checkstyle-suppressions.xml in same directory –>--> | ||
<!-- <module name="SuppressionFilter">--> | ||
<!-- <property name="file" value="${checkstyle.suppressions.file}" default="checkstyle-suppressions.xml"/>--> | ||
<!-- </module>--> | ||
|
||
<!-- <!– No tab characters ('\t') allowed in the source code –>--> | ||
<!-- <module name="FileTabCharacter">--> | ||
<!-- <property name="eachLine" value="true"/>--> | ||
<!-- <property name="fileExtensions" value="java, properties, cfg, xml, js, ftl, ttl, n3"/>--> | ||
<!-- </module>--> | ||
|
||
<!-- <!– No Trailing Whitespace, except on lines that only have an asterisk (e.g. comments) –>--> | ||
<!-- <module name="RegexpSingleline">--> | ||
<!-- <property name="format" value="(?<!\*)\s+$|\*\s\s+$"/>--> | ||
<!-- <property name="message" value="Line has trailing whitespace"/>--> | ||
<!-- <property name="fileExtensions" value="java, properties, cfg, css, js, xml"/>--> | ||
<!-- </module>--> | ||
|
||
<!-- <!– Allow individual lines of code to be excluded from these rules, if they are annotated--> | ||
<!-- with @SuppressWarnings. See also SuppressWarningsHolder below –>--> | ||
<!-- <module name="SuppressWarningsFilter" />--> | ||
|
||
<!-- <!– Maximum line length is 100 characters –>--> | ||
<!-- <module name="LineLength">--> | ||
<!-- <property name="fileExtensions" value="java"/>--> | ||
<!-- <property name="max" value="100"/>--> | ||
<!-- <!– Only exceptions for packages, imports, URLs, and JavaDoc {@link} tags –>--> | ||
<!-- <property name="ignorePattern" value="^package.*|^import.*|http://|https://|@link"/>--> | ||
<!-- </module>--> | ||
|
||
<!-- <!– Check individual Java source files for specific rules –>--> | ||
<!-- <module name="TreeWalker">--> | ||
<!-- <!– Highlight any TODO or FIXME comments in info messages –>--> | ||
<!-- <module name="TodoComment">--> | ||
<!-- <property name="severity" value="info"/>--> | ||
<!-- <property name="format" value="(TODO)|(FIXME)"/>--> | ||
<!-- </module>--> | ||
|
||
<!-- <!– Do not report errors on any lines annotated with @SuppressWarnings –>--> | ||
<!-- <module name="SuppressWarningsHolder"/>--> | ||
|
||
<!-- <!– ##### Import statement requirements ##### –>--> | ||
<!-- <!– Star imports (e.g. import java.util.*) are NOT ALLOWED –>--> | ||
<!-- <module name="AvoidStarImport"/>--> | ||
<!-- <!– Redundant import statements are NOT ALLOWED –>--> | ||
<!-- <module name="RedundantImport"/>--> | ||
<!-- <!– Unused import statements are NOT ALLOWED –>--> | ||
<!-- <module name="UnusedImports"/>--> | ||
<!-- <!– Ensure imports appear alphabetically and grouped –>--> | ||
<!-- <module name="CustomImportOrder">--> | ||
<!-- <property name="sortImportsInGroupAlphabetically" value="true"/>--> | ||
<!-- <property name="separateLineBetweenGroups" value="true"/>--> | ||
<!-- <property name="customImportOrderRules" value="STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE"/>--> | ||
<!-- </module>--> | ||
|
||
<!-- <!– ##### Requirements for K&R Style braces ##### –>--> | ||
<!-- <!– Code blocks MUST HAVE braces, even single line statements (if, while, etc) –>--> | ||
<!-- <module name="NeedBraces"/>--> | ||
<!-- <!– Left braces should be at the end of current line (default value)–>--> | ||
<!-- <module name="LeftCurly"/>--> | ||
<!-- <!– Right braces should be on start of a new line (default value) –>--> | ||
<!-- <module name="RightCurly"/>--> | ||
|
||
<!-- <!– ##### Indentation / Whitespace requirements ##### –>--> | ||
<!-- <!– Require 4-space indentation (default value) –>--> | ||
<!-- <module name="Indentation"/>--> | ||
<!-- <!– Whitespace should exist around all major tokens –>--> | ||
<!-- <module name="WhitespaceAround">--> | ||
<!-- <!– However, make an exception for empty constructors, methods, types, etc. –>--> | ||
<!-- <property name="allowEmptyConstructors" value="true"/>--> | ||
<!-- <property name="allowEmptyMethods" value="true"/>--> | ||
<!-- <property name="allowEmptyTypes" value="true"/>--> | ||
<!-- <property name="allowEmptyLoops" value="true"/>--> | ||
<!-- </module>--> | ||
<!-- <!– Validate whitespace around Generics (angle brackets) per typical conventions--> | ||
<!-- http://checkstyle.sourceforge.net/config_whitespace.html#GenericWhitespace –>--> | ||
<!-- <module name="GenericWhitespace"/>--> | ||
|
||
<!-- <!– ##### Other / Miscellaneous requirements ##### –>--> | ||
<!-- <!– Require each variable declaration is its own statement on its own line –>--> | ||
<!-- <module name="MultipleVariableDeclarations"/>--> | ||
<!-- <!– Each line of code can only include one statement –>--> | ||
<!-- <module name="OneStatementPerLine"/>--> | ||
<!-- </module>--> | ||
</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