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

diktat-gradle-plugin: add support for multiple reporters #1733

Closed
Tracked by #1800
illarionov opened this issue Sep 15, 2023 · 2 comments · Fixed by #1808 or #1812
Closed
Tracked by #1800

diktat-gradle-plugin: add support for multiple reporters #1733

illarionov opened this issue Sep 15, 2023 · 2 comments · Fixed by #1808 or #1812
Assignees
Labels
bug Something isn't working
Milestone

Comments

@illarionov
Copy link

Now you can set only one reporter in the diktat-gradle-plugin plugin using the report configuration parameter or by setting
the "githubActions = true".
Setting the reporter to sarif disables error reporting to stdout.
It would be nice if we could enable both of them.

@illarionov illarionov added the bug Something isn't working label Sep 15, 2023
@nulls
Copy link
Member

nulls commented Sep 15, 2023

Hi @illarionov, thanks for raising the issue. We will look into it

Note: it can be done in scope #1472

@nulls nulls added this to the 2.0.0 milestone Nov 10, 2023
@nulls nulls self-assigned this Nov 10, 2023
nulls added a commit that referenced this issue Nov 15, 2023
- supported Gradle action reporter as additional reporter

It closes #1733
@nulls nulls linked a pull request Nov 21, 2023 that will close this issue
nulls added a commit that referenced this issue Nov 21, 2023
### What's done:
- mustRunAfter instead of dependsOn to allow run `mergeDiktatReports` after failing diktatCheck

It closes #1733
@nulls
Copy link
Member

nulls commented Nov 21, 2023

Hi @illarionov,

We supported it in 2.0.0 (will be released soon).

It will require changes in diktat configuration. Example:

// enables sarif reporting to a single file by flag: `diktat.githubActions`
githubActions = findProperty("diktat.githubActions")?.toString()?.toBoolean() ?: false
reporters {
    // enables plain reporters with output to stdout
    plain()
}

README.md will be updated accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants