From 5897eb70bc0a1400e265963bddf1afc60bfa809c Mon Sep 17 00:00:00 2001 From: Anne Brouwers Date: Tue, 28 Jun 2022 17:19:18 +0200 Subject: [PATCH] Implement PR feedback --- pmd-gherkin/pom.xml | 4 ++-- .../pmd/lang/gherkin/{antlr4 => ast}/Gherkin.g4 | 0 .../java/net/sourceforge/pmd/cpd/GherkinLanguage.java | 2 +- .../net/sourceforge/pmd/cpd/GherkinTokenizer.java | 4 ++-- .../java/net/sourceforge/pmd/cpd/package-info.java | 8 ++++++++ .../pmd/lang/gherkin/antlr4/package-info.java | 11 ----------- .../pmd/lang/gherkin/ast/package-info.java | 8 ++++++++ .../net/sourceforge/pmd/cpd/GherkinTokenizerTest.java | 5 ----- 8 files changed, 21 insertions(+), 21 deletions(-) rename pmd-gherkin/src/main/antlr4/net/sourceforge/pmd/lang/gherkin/{antlr4 => ast}/Gherkin.g4 (100%) create mode 100644 pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/package-info.java delete mode 100644 pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/antlr4/package-info.java create mode 100644 pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/package-info.java diff --git a/pmd-gherkin/pom.xml b/pmd-gherkin/pom.xml index a9563a1e9d..e49be3647b 100644 --- a/pmd-gherkin/pom.xml +++ b/pmd-gherkin/pom.xml @@ -7,8 +7,8 @@ net.sourceforge.pmd pmd - 6.46.0 - ../ + 6.48.0-SNAPSHOT + ../pom.xml diff --git a/pmd-gherkin/src/main/antlr4/net/sourceforge/pmd/lang/gherkin/antlr4/Gherkin.g4 b/pmd-gherkin/src/main/antlr4/net/sourceforge/pmd/lang/gherkin/ast/Gherkin.g4 similarity index 100% rename from pmd-gherkin/src/main/antlr4/net/sourceforge/pmd/lang/gherkin/antlr4/Gherkin.g4 rename to pmd-gherkin/src/main/antlr4/net/sourceforge/pmd/lang/gherkin/ast/Gherkin.g4 diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinLanguage.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinLanguage.java index 85f50da4cc..1dd68d4e39 100644 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinLanguage.java +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinLanguage.java @@ -5,7 +5,7 @@ package net.sourceforge.pmd.cpd; /** - * Language implementation for Gherkin + * Language implementation for Gherkin. */ public class GherkinLanguage extends AbstractLanguage { diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinTokenizer.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinTokenizer.java index 20b7da848c..64978c5e7e 100644 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinTokenizer.java +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/GherkinTokenizer.java @@ -8,10 +8,10 @@ import org.antlr.v4.runtime.CharStream; import net.sourceforge.pmd.cpd.token.AntlrTokenFilter; import net.sourceforge.pmd.lang.antlr.AntlrTokenManager; -import net.sourceforge.pmd.lang.gherkin.antlr4.GherkinLexer; +import net.sourceforge.pmd.lang.gherkin.ast.GherkinLexer; /** - * The Gherkin Tokenizer + * The Gherkin Tokenizer. */ public class GherkinTokenizer extends AntlrTokenizer { diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/package-info.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/package-info.java new file mode 100644 index 0000000000..53ab0add38 --- /dev/null +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/cpd/package-info.java @@ -0,0 +1,8 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +/** + * Contains Gherkin tokenizer and language classes. + */ +package net.sourceforge.pmd.cpd; diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/antlr4/package-info.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/antlr4/package-info.java deleted file mode 100644 index 3f06008e46..0000000000 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/antlr4/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * BSD-style license; for more info see http://pmd.sourceforge.net/license.html - */ - -/** - * The class {@link net.sourceforge.pmd.lang.gherkin.antlr4.GherkinLexer} will be moved to - * package {@code net.sourceforge.pmd.lang.gherkin.ast} with PMD 7. - * - *

All other classes will be removed. - */ -package net.sourceforge.pmd.lang.gherkin.antlr4; diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/package-info.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/package-info.java new file mode 100644 index 0000000000..109abde01a --- /dev/null +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/package-info.java @@ -0,0 +1,8 @@ +/* + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +/** + * Contains the Antlr grammar for Gherkin. + */ +package net.sourceforge.pmd.lang.gherkin.ast; diff --git a/pmd-gherkin/src/test/java/net/sourceforge/pmd/cpd/GherkinTokenizerTest.java b/pmd-gherkin/src/test/java/net/sourceforge/pmd/cpd/GherkinTokenizerTest.java index 8dbc3bac22..b6f0d98754 100644 --- a/pmd-gherkin/src/test/java/net/sourceforge/pmd/cpd/GherkinTokenizerTest.java +++ b/pmd-gherkin/src/test/java/net/sourceforge/pmd/cpd/GherkinTokenizerTest.java @@ -7,15 +7,10 @@ package net.sourceforge.pmd.cpd; import java.util.Properties; import org.junit.Test; -import org.junit.rules.ExpectedException; import net.sourceforge.pmd.cpd.test.CpdTextComparisonTest; public class GherkinTokenizerTest extends CpdTextComparisonTest { - - @org.junit.Rule - public ExpectedException ex = ExpectedException.none(); - public GherkinTokenizerTest() { super(".feature"); }