-
Notifications
You must be signed in to change notification settings - Fork 65
[MCHECKSTYLE-449] Add support for SARIF output format #136
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
Conversation
|
Add |
7143e0e to
1ad6033
Compare
|
I'm trying to use this and running into: My command is: My versions are: <profile>
<id>checkstyle-semantics</id>
<build>
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.4.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.17.0</version>
</dependency>
</dependencies>
<configuration>
<configLocation>checkstyle-configuration-semantics.xml</configLocation>
<outputFileFormat>sarif</outputFileFormat>
</configuration>
<executions>
<execution>
<id>checkstyle:check semantics</id>
<goals>
<goal>check</goal>
</goals>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile> |
|
@motlin, can you provide |
|
Hold on, 10.17.0 is a major version. Signatures might have changed from 9. You should check that first. If it runs with the stock one, then the issue is clear. |
|
Downgrading to Checkstyle 9.3 seemed to work. It's not ideal since I use some newer checks. |
This is something we cannot fix because Checkstyle raised to Java 11 some time ago. |
|
Would it make sense to release versions of maven-checkstyle-plugin that are separately compatible with 9.x and 10.x? |
Technically yes, but not before the Doxia 2.0.0 stack has been integrated. That would force me to maintain four versions which I am not going to do. |
|
Does anyone have an example of SARIF support working, all the way to adding annotations on a PR, using maven-checkstyle-plugin? I've spent a few hours on this and I have the SARIF report being created and uploaded to GitHub but cannot get annotations to appear. One potential problem is that "artifactLocation": {
"uri": "/home/runner/work/myproject/src/main/java/mypackage/MyClass.java"
},It looks like the Ant task accepts a basedir to configure the common prefix to strip. I'm concerned that this might not be the only issue, because I can't find any examples in GitHub OSS projects of this feature working. |
|
Resolve #360 |
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MCHECKSTYLE-XXX] - Fixes bug in ApproximateQuantiles,where you replace
MCHECKSTYLE-XXXwith the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean verify).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.