ScaCap / action-ktlint

Run Ktlint with reviewdog
Apache License 2.0
84 stars 29 forks source link

Any way to make ktlint report a failure but continue to lint the rest of the PR? #16

Closed MackHartley closed 3 years ago

MackHartley commented 3 years ago

Hey there, I was trying to add this to my open source project. I'd like the ktlint job to run for new PRs and if an issue is detected I want an error to be reported so the PR cannot be merged. However, the issue with this is it seems the ktlint job stops running once it encounters an issue. Is there a way to make it continue to lint after it has found an issue? If a PR had multiple lint issues it would be better to get a report of all the issues rather than fixing them one commit at a time.

Fyi I had fail_on_error = true. If I set it to false then it seems to report all the ktlint issues.

renatoabreu11 commented 3 years ago

The fail_on_error has a default value of false. The behaviour should be to analyze the code changes (depending on the filter mode) and report all errors. Could you please create a short PR with the problem you mention?

MackHartley commented 3 years ago

Hey there! Sorry for the late reply. This was some time ago and I don't remember the scenario any more. Feel free to close this issue out though and thanks for the reply!