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

feat: allow configuring additional linters to run #881

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

grunweg
Copy link
Contributor

@grunweg grunweg commented Jul 12, 2024

Extend getChecks to allow an additional list of linters, which is always run. This can be used downstream to e.g. enable the docBlameThm or explicitVarsOfIff linters without modifying batteries.

As part of this, we

  • update fix the function docstring (which was quite outdated anyway)
  • remove the useOnly option: the equivalent effect can be achieved by filtering the list of linters afterwards; adding linters cannot, hence must be performed in this function. (That said, I'm happy to add this functionality back if desired.)
  • rename a variable dflt to the more readable default
  • adjust the logic of the #lint command accordingly
    Note that test/lint_simpNF.lean lies on this (the docBlame linter warns there) - so this changed is already tested.

@grunweg grunweg force-pushed the patch-2 branch 4 times, most recently from a3747dd to 077f2de Compare July 12, 2024 09:47
@grunweg
Copy link
Contributor Author

grunweg commented Jul 12, 2024

awaiting-review

@github-actions github-actions bot added the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label Jul 12, 2024
Extend getChecks to allow an additional list of linters, which is always run.
This can be used downstream to e.g. enable the docBlameThm or explicitVarsOfIff
linters without modifying batteries.

As part of this, we
- update and fix the function doc-string (which was quite outdated)
- remove the useOnly option: the equivalent effect can be achieved by
filtering the list of linters afterwards; *adding* linters cannot,
hence must be performed in this function
- rename a variable `dflt` to the more readable `default`
@grunweg
Copy link
Contributor Author

grunweg commented Jul 12, 2024

I just pushed a commit adding back the useOnly option as runOnly.

@semorrison semorrison merged commit 27b7b88 into leanprover-community:main Jul 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review This PR is ready for review; the author thinks it is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants