From d15f5df6843f43d7cd5edd3a97b2fa640a02ba39 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 26 Feb 2017 18:38:57 +0000 Subject: [PATCH 1/6] pom.xml: version set to 2.2.0-SNAPSHOT --- builder/pom.xml | 2 +- plugin-sample/pom.xml | 2 +- plugin/pom.xml | 2 +- pom.xml | 2 +- ruleset/pom.xml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index d76d9c6..37dfc68 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-builder - 2.1.3 + 2.2.0-SNAPSHOT jar Kemitix Checkstyle Ruleset Builder diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index fe764fb..f8785db 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-SNAPSHOT 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..0e23bdf 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-SNAPSHOT kemitix-checkstyle-ruleset-maven-plugin diff --git a/pom.xml b/pom.xml index 1d75051..d294662 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.1.3 + 2.2.0-SNAPSHOT pom Kemitix Checkstyle Ruleset (Parent) diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 1a9d912..265309e 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-SNAPSHOT kemitix-checkstyle-ruleset - 2.1.3 + 2.2.0-SNAPSHOT jar Kemitix Checkstyle Ruleset From f9ee73f1485503de74ee73b590301046ca534554 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Mar 2017 16:55:34 +0000 Subject: [PATCH 2/6] RegexpOnFilename: Add a new rule to detect if there are any sync conflict files Fails if there there are any Syncthing or Dropbox sync conflicts on any *.java file. --- README.md | 17 +++++++++++++++++ builder/src/main/resources/application.yml | 10 ++++++++++ .../main/resources/rules/RegexpOnFilename.md | 15 +++++++++++++++ .../net/kemitix/checkstyle-1-layout.xml | 6 +++++- .../net/kemitix/checkstyle-2-naming.xml | 6 +++++- .../net/kemitix/checkstyle-3-javadoc.xml | 6 +++++- .../net/kemitix/checkstyle-4-tweaks.xml | 6 +++++- .../net/kemitix/checkstyle-5-complexity.xml | 6 +++++- 8 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 builder/src/main/resources/rules/RegexpOnFilename.md 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/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/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"> - + + + + + From 3b097ead9fbfad51ec43fc4025ae16cd8c08e9ce Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Mar 2017 17:07:01 +0000 Subject: [PATCH 3/6] pom.xml: upgrade Checkstyle to 7.6 http://checkstyle.sourceforge.net/releasenotes.html#Release_7.6 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d294662..f6fdadb 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 2.8.2 2.17 - 7.5.1 + 7.6 1.23.0 From 0e33cc2beace0615ade44b8fdf7e325a8211073e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Mar 2017 17:29:57 +0000 Subject: [PATCH 4/6] Upgrade sevntu to 1.23.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f6fdadb..8187296 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ 2.17 7.6 - 1.23.0 + 1.23.1 From cc5d8f7ed15e44a379732e9e55fd03c873f0bee0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Mar 2017 17:41:50 +0000 Subject: [PATCH 5/6] pom.xml: version set to 2.2.0 --- builder/pom.xml | 2 +- plugin-sample/pom.xml | 2 +- plugin/pom.xml | 2 +- pom.xml | 2 +- ruleset/pom.xml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builder/pom.xml b/builder/pom.xml index 37dfc68..0648ad5 100644 --- a/builder/pom.xml +++ b/builder/pom.xml @@ -12,7 +12,7 @@ kemitix-checkstyle-ruleset-builder - 2.2.0-SNAPSHOT + 2.2.0 jar Kemitix Checkstyle Ruleset Builder diff --git a/plugin-sample/pom.xml b/plugin-sample/pom.xml index f8785db..58af8ba 100644 --- a/plugin-sample/pom.xml +++ b/plugin-sample/pom.xml @@ -8,7 +8,7 @@ net.kemitix kemitix-checkstyle-ruleset-plugin-sample - 2.2.0-SNAPSHOT + 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 0e23bdf..4bd6181 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -7,7 +7,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.2.0-SNAPSHOT + 2.2.0 kemitix-checkstyle-ruleset-maven-plugin diff --git a/pom.xml b/pom.xml index 8187296..dc2b228 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.2.0-SNAPSHOT + 2.2.0 pom Kemitix Checkstyle Ruleset (Parent) diff --git a/ruleset/pom.xml b/ruleset/pom.xml index 265309e..c8058c1 100644 --- a/ruleset/pom.xml +++ b/ruleset/pom.xml @@ -7,11 +7,11 @@ net.kemitix kemitix-checkstyle-ruleset-parent - 2.2.0-SNAPSHOT + 2.2.0 kemitix-checkstyle-ruleset - 2.2.0-SNAPSHOT + 2.2.0 jar Kemitix Checkstyle Ruleset From de799dbc0806a1322caf279b6ca1d0095ca8bf11 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Mar 2017 17:43:15 +0000 Subject: [PATCH 6/6] CHANGELOG --- CHANGELOG | 7 +++++++ 1 file changed, 7 insertions(+) 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 -----