diff --git a/CHANGELOG b/CHANGELOG index c0c8c1a..9967549 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,13 @@ CHANGELOG ========= +2.2.0 +----- + +* Upgrade sevntu to 1.23.1 +* Upgrade checkstyle to 7.6 +* Detect sync conflicts + 2.1.3 ----- diff --git a/README.md b/README.md index 6b6028c..99a6525 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,7 @@ Rule|Level|Source|Enabled|Suppressable [Regexp](#regexp)|unspecified|checkstyle|| [RegexpHeader](#regexpheader)|unspecified|checkstyle|| [RegexpMultiline](#regexpmultiline)|unspecified|checkstyle|| +[RegexpOnFilename](#regexponfilename)|layout|checkstyle|Yes| [RegexpOnFilename](#regexponfilename)|unspecified|checkstyle|| [RegexpSingleline](#regexpsingleline)|unspecified|checkstyle|| [RegexpSinglelineJava](#regexpsinglelinejava)|unspecified|checkstyle|| @@ -274,6 +275,22 @@ The following is a list of each of the checks and the expectations each has on y Rules are listed in alphabetical order. +#### [RegexpOnFilename](http://checkstyle.sourceforge.net/config_regexp.html#RegexpOnFilename) + +Checks for the existence of forbidden java file names. + +File names are forbidden if they match the pattern `(.sync-conflict-| conflicted copy )`. + +N.B. only `*.java` files are checked. + +This check is intended to detect Syncthing and Dropbox conflict files. + +e.g. +```` +DataClass (Bob's conflicted copy 2017-03-11).java +DataClass.sync-conflict-20170311-1648.java +```` + #### [AbbreviationAsWordInName](http://checkstyle.sourceforge.net/config_naming.html#AbbreviationAsWordInName) Enforces proper `CamelCase` and avoids sequences of consecutive uppercase characters in identifiers. Does not apply to @Overridden methods. diff --git a/builder/pom.xml b/builder/pom.xml index d76d9c6..0648ad5 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-builder - 2.1.3 + 2.2.0 jar Kemitix Checkstyle Ruleset Builder diff --git a/builder/src/main/resources/application.yml b/builder/src/main/resources/application.yml index 674e39a..02ca4d6 100644 --- a/builder/src/main/resources/application.yml +++ b/builder/src/main/resources/application.yml @@ -12,6 +12,16 @@ template: readme-template: builder/src/main/resources/README-template.md readme-fragments: builder/src/main/resources/rules rules: + - + name: RegexpOnFilename + parent: CHECKER + level: LAYOUT + enabled: true + source: CHECKSTYLE + uri: http://checkstyle.sourceforge.net/config_regexp.html#RegexpOnFilename + properties: + fileNamePattern: "(.sync-conflict-| conflicted copy )" + match: true - name: AbbreviationAsWordInName parent: TREEWALKER diff --git a/builder/src/main/resources/rules/RegexpOnFilename.md b/builder/src/main/resources/rules/RegexpOnFilename.md new file mode 100644 index 0000000..5319e2c --- /dev/null +++ b/builder/src/main/resources/rules/RegexpOnFilename.md @@ -0,0 +1,15 @@ + +Checks for the existence of forbidden java file names. + +File names are forbidden if they match the pattern `(.sync-conflict-| conflicted copy )`. + +N.B. only `*.java` files are checked. + +This check is intended to detect Syncthing and Dropbox conflict files. + +e.g. +```` +DataClass (Bob's conflicted copy 2017-03-11).java +DataClass.sync-conflict-20170311-1648.java +```` + diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index fe764fb..58af8ba 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -8,7 +8,7 @@ net.kemitix kemitix-checkstyle-ruleset-plugin-sample - 2.1.3 + 2.2.0 Kemitix Checkstyle Ruleset Plugin Sample Sample usage of the Kemitix Checkstyle Ruleset Plugin diff --git a/plugin/pom.xml b/plugin/pom.xml index a227ab3..4bd6181 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.1.3 + 2.2.0 kemitix-checkstyle-ruleset-maven-plugin diff --git a/pom.xml b/pom.xml index 1d75051..dc2b228 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.1.3 + 2.2.0 pom Kemitix Checkstyle Ruleset (Parent) @@ -21,8 +21,8 @@ 2.8.2 2.17 - 7.5.1 - 1.23.0 + 7.6 + 1.23.1 diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 1a9d912..c8058c1 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.1.3 + 2.2.0 kemitix-checkstyle-ruleset - 2.1.3 + 2.2.0 jar Kemitix Checkstyle Ruleset diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml index 72c0d46..c7c3f72 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-1-layout.xml @@ -4,7 +4,11 @@ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> - + + + + + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml index d27be47..040fe94 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-2-naming.xml @@ -4,7 +4,11 @@ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> - + + + + + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml index 1fe56af..811e021 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-3-javadoc.xml @@ -4,7 +4,11 @@ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> - + + + + + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml index cf4ce72..50b1a88 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-4-tweaks.xml @@ -4,7 +4,11 @@ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> - + + + + + diff --git a/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml b/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml index 44de9aa..b258137 100644 --- a/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml +++ b/ruleset/src/main/resources/net/kemitix/checkstyle-5-complexity.xml @@ -4,7 +4,11 @@ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> - + + + + +