Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it clear to user that TreeWalker has hardcoded FileContentsHolder and SuppressWarningsHolder #99

Open
romani opened this issue Apr 5, 2017 · 1 comment
Labels

Comments

@romani
Copy link
Member

romani commented Apr 5, 2017

Taken from #98

When I define one rule in a sonar profile, like Indentation, the following configuration is created:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!-- Generated by Sonar -->
<module name="Checker">
  <module name="SuppressionCommentFilter"/>
  <module name="SuppressWarningsFilter"/>
  <module name="TreeWalker">
    <module name="FileContentsHolder"/>
    <module name="SuppressWarningsHolder"/>
    <module name="Indentation">
      <property name="severity" value="info"/>
      <property name="throwsIndent" value="4"/>
      <property name="arrayInitIndent" value="4"/>
      <property name="forceStrictCondition" value="false"/>
      <property name="caseIndent" value="4"/>
      <property name="basicOffset" value="4"/>
      <property name="braceAdjustment" value="0"/>
      <property name="lineWrappingIndentation" value="4"/>
    </module>
  </module>
</module>

It should also be noted since we are auto-adding FileContentsHolder and SuppressWarningsHolder, we can remove them from the rules file as only 1 instance is needed.

@romani
Copy link
Member Author

romani commented Apr 5, 2017

SuppressWarningsHolder is required for http://checkstyle.sourceforge.net/config_filters.html#SuppressWarningsFilter , as it default filter currently , so SuppressWarningsHolder exists in config by default only to let default filter work

FileContentsHolder is required for http://checkstyle.sourceforge.net/config_filters.html#SuppressionCommentFilter for the same reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant