Skip to content

Conversation

@deivid-rodriguez
Copy link
Contributor

What? Why?

While working on #13639, I realized that our prettier is action is broken in a few ways:

  • As manifested by Verify if latest reviewdog fixes issues with big diffs #13639, it does not work for big PRs because of an old bug, and we suffer from it because for prettier we're running a very old version. This is what Verify if latest reviewdog fixes issues with big diffs #13639 is fixing.

  • It does not post anything to the checks API due to permission issues, so it's essentially permanently silent and green. This should be easy to fix by tweaking linters workflow permissions. I will create a PR for this later if we decide to keep reviewdog.

  • Finally, reviewdog's default filter mode (name "added", which acts only on changed files) seems to have issues and filters out all files. But even if it worked, it may create unnecessary burden for contributors when they change lines with style issues, even if it was not them who introduced them. I think it'd be best if we use the nofilter mode, and make sure the codebase have zero issues. That fixes both problems and it's the approach already used by rubocop since Test all files with Rubocop, not just added code in the diff #12393, because of the same reason.

This PR is in preparation for changing reviewdog to run prettier in nofilter mode and fix the remaining issues mentioned above.

What should we test?

Prettier is just a formatter so should never break anything, but I did go through the diff just to make sure there are no "formatting bugs". Also a green CI would be reassuring.

Release notes

  • Technical changes only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Code review 🔎

Development

Successfully merging this pull request may close these issues.

1 participant