From f262b1c13b0dfe1a17ccf9b54a20cc30d7657b30 Mon Sep 17 00:00:00 2001 From: martin-mfg <2026226+martin-mfg@users.noreply.github.com> Date: Fri, 12 Feb 2021 15:23:07 +0100 Subject: [PATCH] Issue #9280: replace `Scope` with `AccessModifierOption` in JavadocVariableCheck --- .ci/validation.sh | 2 +- .ci/wercker.sh | 23 +-- .../checks/javadoc/JavadocVariableCheck.java | 137 ++++++++++-------- .../checks/javadoc/JavadocVariableCheck.xml | 13 +- .../javadoc/JavadocVariableCheckTest.java | 23 +-- src/xdocs/config_javadoc.xml | 59 ++------ 6 files changed, 119 insertions(+), 138 deletions(-) diff --git a/.ci/validation.sh b/.ci/validation.sh index baa997308a7..1d1f20ddeee 100755 --- a/.ci/validation.sh +++ b/.ci/validation.sh @@ -168,7 +168,7 @@ no-error-xwiki) CS_POM_VERSION="$(getCheckstylePomVersion)" echo version:$CS_POM_VERSION mvn -e --no-transfer-progress clean install -Pno-validations - checkout_from "https://github.com/xwiki/xwiki-commons.git" + checkout_from "-b checkstyle_9280 https://github.com/checkstyle/xwiki-commons.git" cd .ci-temp/xwiki-commons # Build custom Checkstyle rules mvn -e --no-transfer-progress -f \ diff --git a/.ci/wercker.sh b/.ci/wercker.sh index d90472e3775..9557e7499ee 100755 --- a/.ci/wercker.sh +++ b/.ci/wercker.sh @@ -200,16 +200,19 @@ no-error-spring-integration) ;; no-error-spring-cloud-gcp) - set -e - CS_POM_VERSION="$(getCheckstylePomVersion)" - echo CS_version: ${CS_POM_VERSION} - checkout_from https://github.com/googlecloudplatform/spring-cloud-gcp - cd .ci-temp/spring-cloud-gcp - mvn -e --no-transfer-progress checkstyle:check@checkstyle-validation \ - -Dmaven-checkstyle-plugin.version=3.1.1 \ - -Dpuppycrawl-tools-checkstyle.version=${CS_POM_VERSION} - cd .. - removeFolderWithProtectedFiles spring-cloud-gcp + # disabled until https://github.com/spring-io/spring-javaformat/pull/274 is merged, because of + # a breaking change (https://github.com/checkstyle/checkstyle/pull/9277) in checkstyle. + + #set -e + # CS_POM_VERSION="$(getCheckstylePomVersion)" + # echo CS_version: ${CS_POM_VERSION} + # checkout_from https://github.com/googlecloudplatform/spring-cloud-gcp + # cd .ci-temp/spring-cloud-gcp + # mvn -e --no-transfer-progress checkstyle:check@checkstyle-validation \ + # -Dmaven-checkstyle-plugin.version=3.1.1 \ + # -Dpuppycrawl-tools-checkstyle.version=${CS_POM_VERSION} + # cd .. + # removeFolderWithProtectedFiles spring-cloud-gcp ;; no-exception-struts) diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java index 487efa58bf0..0c05339593b 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java @@ -19,6 +19,7 @@ package com.puppycrawl.tools.checkstyle.checks.javadoc; +import java.util.Arrays; import java.util.regex.Pattern; import com.puppycrawl.tools.checkstyle.StatelessCheck; @@ -28,6 +29,7 @@ import com.puppycrawl.tools.checkstyle.api.Scope; import com.puppycrawl.tools.checkstyle.api.TextBlock; import com.puppycrawl.tools.checkstyle.api.TokenTypes; +import com.puppycrawl.tools.checkstyle.checks.naming.AccessModifierOption; import com.puppycrawl.tools.checkstyle.utils.ScopeUtil; /** @@ -36,15 +38,10 @@ *

*