saveourtool / diktat

Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
https://diktat.saveourtool.com
MIT License
537 stars 39 forks source link

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

Closed illarionov closed 11 months ago

illarionov commented 1 year ago

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.

nulls commented 1 year ago

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

Note: it can be done in scope #1472

nulls commented 11 months ago

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