diff options
author | Timur <timurtibeyev@gmail.com> | 2017-07-18 14:07:19 +0600 |
---|---|---|
committer | Roman Ivanov <romani@users.noreply.github.com> | 2017-07-24 13:38:15 -0700 |
commit | 6d9e8ece85007117e048fef55469623b830f9446 (patch) | |
tree | c9222ee629cc053d3e0b5913d33f83d383979c32 /config | |
parent | 4c10bc55b4aea0f7e3b95b06d820eedb7c6a6fb2 (diff) | |
download | checkstyle-6d9e8ece85007117e048fef55469623b830f9446.tar.gz |
Issue #4714: Make SuppressionCommentFilter and SuppressWithNearbyCommentFilter children of TreeWalker
Diffstat (limited to 'config')
-rw-r--r-- | config/checkstyle_checks.xml | 30 | ||||
-rw-r--r-- | config/checkstyle_sevntu_checks.xml | 10 | ||||
-rw-r--r-- | config/import-control.xml | 2 |
3 files changed, 23 insertions, 19 deletions
diff --git a/config/checkstyle_checks.xml b/config/checkstyle_checks.xml index 24a085000..2b88ede5e 100644 --- a/config/checkstyle_checks.xml +++ b/config/checkstyle_checks.xml @@ -31,24 +31,10 @@ <property name="severity" value="ignore"/> <property name="acceptOnMatch" value="false"/> </module> - <module name="SuppressionCommentFilter"> - <!-- - Use suppressions.xml for suppressions, this is only example. - checkFormat will prevent suppression comments from being valid. - --> - <property name="checkFormat" value="IGNORETHIS"/> - <property name="offCommentFormat" value="CSOFF\: .*"/> - <property name="onCommentFormat" value="CSON\: .*"/> - </module> <module name="SuppressionFilter"> <property name="file" value="${checkstyle.suppressions.file}"/> </module> <module name="SuppressWarningsFilter"/> - <module name="SuppressWithNearbyCommentFilter"> - <property name="commentFormat" value="-@cs\[(\w{8,}(\|\w{8,})*)\] \w[\(\)\-\.\'\`\,\:\;\w ]{10,}"/> - <property name="checkFormat" value="$1"/> - <property name="influenceFormat" value="3"/> - </module> <!-- Headers --> <module name="Header"> @@ -298,6 +284,22 @@ <module name="UnnecessaryParentheses"/> <module name="VariableDeclarationUsageDistance"/> + <!-- Filters--> + <module name="SuppressionCommentFilter"> + <!-- + Use suppressions.xml for suppressions, this is only example. + checkFormat will prevent suppression comments from being valid. + --> + <property name="checkFormat" value="IGNORETHIS"/> + <property name="offCommentFormat" value="CSOFF\: .*"/> + <property name="onCommentFormat" value="CSON\: .*"/> + </module> + <module name="SuppressWithNearbyCommentFilter"> + <property name="commentFormat" value="-@cs\[(\w{8,}(\|\w{8,})*)\] \w[\(\)\-\.\'\`\,\:\;\w ]{10,}"/> + <property name="checkFormat" value="$1"/> + <property name="influenceFormat" value="3"/> + </module> + <!-- Imports --> <module name="AvoidStarImport"/> <module name="AvoidStaticImport"/> diff --git a/config/checkstyle_sevntu_checks.xml b/config/checkstyle_sevntu_checks.xml index 6b1e719fa..1cfed6c1b 100644 --- a/config/checkstyle_sevntu_checks.xml +++ b/config/checkstyle_sevntu_checks.xml @@ -14,13 +14,13 @@ <module name="SuppressionFilter"> <property name="file" value="${project.basedir}/config/sevntu_suppressions.xml"/> </module> - <module name="SuppressWithNearbyCommentFilter"> - <property name="commentFormat" value="-@cs\[(\w{8,})\] \w[\(\)\-\.\'\`\,\:\;\w ]{10,}"/> - <property name="checkFormat" value="$1"/> - <property name="influenceFormat" value="3"/> - </module> <module name="TreeWalker"> + <module name="SuppressWithNearbyCommentFilter"> + <property name="commentFormat" value="-@cs\[(\w{8,})\] \w[\(\)\-\.\'\`\,\:\;\w ]{10,}"/> + <property name="checkFormat" value="$1"/> + <property name="influenceFormat" value="3"/> + </module> <module name="FileContentsHolder"/> <module name="StaticMethodCandidate"/> <module name="UselessSingleCatchCheck"/> diff --git a/config/import-control.xml b/config/import-control.xml index e34ebd869..6ff5c7fa4 100644 --- a/config/import-control.xml +++ b/config/import-control.xml @@ -142,6 +142,8 @@ <subpackage name="filters"> <allow class="java.lang.ref.WeakReference" local-only="true"/> + <allow class="com.puppycrawl.tools.checkstyle.TreeWalkerAuditEvent" local-only="true"/> + <allow class="com.puppycrawl.tools.checkstyle.TreeWalkerFilter" local-only="true"/> <disallow pkg="com\.puppycrawl\.tools\.checkstyle\.checks\.[^.]+" regex="true"/> <allow pkg="com.puppycrawl.tools.checkstyle.utils"/> </subpackage> |