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

Two Unresolved configuration properties (with empty value) result in configurations that can not be changed #320

Open
geocodoc opened this issue Sep 2, 2021 · 0 comments

Comments

@geocodoc
Copy link

geocodoc commented Sep 2, 2021

ABSTRACT:

In the current Eclipse Checkstyle version, it appears that you cannot copy a configuration, make some changes, and then run this copy correctly. A possible reason is that two specific configuration properties are not added to the default (Sun) configuration, while they are in some way already defined as Filter properties. Since it is not clear for me as a user which values these two properties can contain, for now I found a workaround that is also detailed below. This workaround may be helpful to other community users having the same issue.

DETAILS:
Eclipse IDE Version: 2021-03 (4.19.0)
Build id: 20210312-0638
OS: Windows 10, v.10.0, x86_64 / win32
Java version: 15.0.2
Eclipse Checkstyle version 8.44.0.202108061901

REPRODUCTION PATH:

  • Install Eclipse Checkstyle
  • Window > Preferences > Checkstyle
  • Select the "" configuration
  • Click <Copy...>
  • In the dialog, click
  • Click
  • Open the dialog for a Java project, and select
  • Select
  • In the dropdown list, select the "Copy of Sun Checks" configuration you just made
  • Click
  • In the "Rebuild suggested" question dialog, Click

-> Outcome = Expected Outcome = OK: The "Copy of Sun Checks" configuration runs correctly.

Now change something in this configuration, e.g. disable a module:

  • Window > Preferences > Checkstyle
  • Select the configuration
  • Click <Configure...>
  • as an example, select Javadoc Comments, and clear the checkbox for the "JavadocPackage" module
  • Click
  • Click
  • In the "Rebuild ..." question dialog, Click

-> EXPECTED OUTCOME: The configuration runs correctly, and some specific Javadoc Comments (if any) are not reported anymore.

-> OUTCOME: Error Message: "Checkstyle execution failed due to an internal error. Please check error log for details"

-> Error Log: "Checkstyle-Plugin: unable to parse configuration stream".
When having a close look at the Exception Stack Trace, it contains the line:

"Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Property ${org.checkstyle.sun.suppressionxpathfilter.config} has not been set"

TEMPORARY WORKAROUND:
Remove two specific properties for this configuration, as follows:

  • Window > Preferences > Checkstyle
  • Select the configuration
  • Click <Configure...>
    -> Select the module
    -> Remove BOTH Modules "SuppressionXpathFilter" and "SuppressionFilter" from the configuration
  • Click
  • Click
  • In the "Rebuild ..." question dialog, Click

-> Outcome = Expected Outcome = OK: The "Copy of Sun Checks" configuration runs correctly.

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

No branches or pull requests

1 participant