From 9d15c900dbecea3beda88564443edabd0e3450e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADn=20Sotuyo=20Dodero?= Date: Fri, 15 Nov 2024 11:27:07 -0300 Subject: [PATCH] Pass linters in generated code --- .../sourceforge/pmd/lang/gherkin/ast/GherkinBaseListener.java | 3 ++- .../sourceforge/pmd/lang/gherkin/ast/GherkinBaseVisitor.java | 2 +- .../net/sourceforge/pmd/lang/gherkin/ast/GherkinListener.java | 2 +- .../net/sourceforge/pmd/lang/gherkin/ast/GherkinParser.java | 4 +++- .../net/sourceforge/pmd/lang/gherkin/ast/GherkinVisitor.java | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseListener.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseListener.java index ddbeb87d8d..d1b7e78105 100644 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseListener.java +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseListener.java @@ -18,6 +18,7 @@ import org.antlr.v4.runtime.tree.TerminalNode; * @deprecated Since 7.8.0. This class was never intended to be generated. It will be removed with no replacement. */ +@SuppressWarnings("PMD.UncommentedEmptyMethodBody") @Deprecated @net.sourceforge.pmd.annotation.Generated("org.antlr.v4.Tool") public class GherkinBaseListener implements GherkinListener { @@ -334,4 +335,4 @@ import org.antlr.v4.runtime.tree.TerminalNode; *

The default implementation does nothing.

*/ @Override public void visitErrorNode(ErrorNode node) { } -} \ No newline at end of file +} diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseVisitor.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseVisitor.java index 90c6480261..d6e8410f7e 100644 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseVisitor.java +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinBaseVisitor.java @@ -189,4 +189,4 @@ import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitText(GherkinParser.TextContext ctx) { return visitChildren(ctx); } -} \ No newline at end of file +} diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinListener.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinListener.java index 5976505f6f..2f8167188e 100644 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinListener.java +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinListener.java @@ -257,4 +257,4 @@ import org.antlr.v4.runtime.tree.ParseTreeListener; * @param ctx the parse tree */ void exitText(GherkinParser.TextContext ctx); -} \ No newline at end of file +} diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinParser.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinParser.java index e8388f2309..1db84c9d0c 100644 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinParser.java +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinParser.java @@ -6,6 +6,8 @@ // Generated from net/sourceforge/pmd/lang/gherkin/ast/Gherkin.g4 by ANTLR 4.9.3 package net.sourceforge.pmd.lang.gherkin.ast; +// CPD-OFF + import java.util.List; import org.antlr.v4.runtime.NoViableAltException; @@ -2097,4 +2099,4 @@ import org.antlr.v4.runtime.tree.TerminalNode; _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); } } -} \ No newline at end of file +} diff --git a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinVisitor.java b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinVisitor.java index e08c47c782..9ac69e5fe0 100644 --- a/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinVisitor.java +++ b/pmd-gherkin/src/main/java/net/sourceforge/pmd/lang/gherkin/ast/GherkinVisitor.java @@ -164,4 +164,4 @@ import org.antlr.v4.runtime.tree.ParseTreeVisitor; * @return the visitor result */ T visitText(GherkinParser.TextContext ctx); -} \ No newline at end of file +}