datasketches-java icon indicating copy to clipboard operation
datasketches-java copied to clipboard

Checkstyle config is broken

Open jmalkin opened this issue 1 year ago • 1 comments

When running checkstyle, there are two issues:

  • suppressions replies on undefined variable ${config_loc}
  • There is an exception: Caused by: java.lang.IllegalArgumentException: 'other' is different type of Path

I was able to remedy these to where I can now run it as java -Dconfig_loc=tools -jar /opt/homebrew/Cellar/checkstyle/10.13.0/libexec/checkstyle-10.13.0-all.jar -c tools/SketchesCheckstyle.xml src but even that required modifying the SketchesCheckstyle.xml to add a path to Checker's basedir in the config: https://github.com/apache/datasketches-java/blob/master/tools/SketchesCheckstyle.xml#L39

Maybe this runs in specific IDEs as-is, but we need to make sure we're not exploiting quirks of an IDE if we expect people to run this routinely.

jmalkin avatar Feb 14 '24 07:02 jmalkin

Removing that basedir line entirely might work for that part, but doesn't solve the missing ${config_loc} issue.

jmalkin avatar Feb 14 '24 08:02 jmalkin