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

Feature: Support reviewdog filter mode #15

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

ghaiszaher
Copy link
Member

@ghaiszaher ghaiszaher commented Mar 25, 2021

What

Support reviewdog's filter mode : https://github.com/reviewdog/reviewdog#filter-mode

Why

Some important ktlint findings do not appear in the PR diff, e.g.

  • When a file is moved to another directory and now an import is unnecessary
  • When the usage of a class is removed from the file, and now the import is unused
  • Needless blank lines is not catched as well for some reason

In above cases, filter-mode=file can be used. In other projects, we could enforce failing even when unrelated findings. are found with filter-mode= nofilter.

How

By adding a new optional input filter_mode with a default value

Note

Tested in a private repo

@ghaiszaher ghaiszaher marked this pull request as ready for review March 25, 2021 09:24
@renatoabreu11 renatoabreu11 self-requested a review March 25, 2021 09:48
@renatoabreu11 renatoabreu11 merged commit e453b66 into ScaCap:master Mar 25, 2021
@ghaiszaher ghaiszaher deleted the support-filter-mode branch March 25, 2021 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants