-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add support for linters #11
Comments
I would like this to work around astral-sh/ruff#8232 by running |
Something like this should work: [formatter.ruff]
command = "sh"
options = ["-c", "ruff check \"$@\" && ruff format \"$@\"", "--"]
includes = ["*.py", "*.pyi"] |
First: thanks for this time-saving project! What's the maintainers' opinion about linters in The docs seem to speak about formatters only, not linters. Also, the name "treefmt" suggests that this is a project about code formatting. Currently, Just asking to see what the chances would be for PRs to support more linters like Surely, the distinction between formatter and linter isn't always that clear. Some linters have an additional fix mode that may change things, akin to formatting. Technically, most linters in check mode return a non-zero exit status if they discover lints, whereas most formatters exit with status zero even if they changed something (Rufo being an exception unless invoked with |
The package was created before Go introduced their own "errors" package. Trade the better juju errors semantic for a smaller dependency tree. Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/11 Co-authored-by: zimbatm <zimbatm@zimbatm.com> Co-committed-by: zimbatm <zimbatm@zimbatm.com>
Stacked on top of #11 Co-authored-by: Brian McGee <brian@bmcgee.ie> Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/13 Co-authored-by: zimbatm <zimbatm@zimbatm.com> Co-committed-by: zimbatm <zimbatm@zimbatm.com>
Unlike formatters, multiple linters can be executed for a single file. Linters sometimes also write back fixes to the file.
The config format has rooms for a
[linters.<name>]
section.This needs to be specced-out a bit more.
The text was updated successfully, but these errors were encountered: