You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,9 @@ you can run:
75
75
lintrunner -m master
76
76
```
77
77
78
+
### `--all-files`
79
+
This will run lint on all files specified in `.lintrunner.toml`.
80
+
78
81
## Linter configuration
79
82
`lintrunner` knows which linters to run and how by looking at a configuration
80
83
file, conventionally named `.lintrunner.toml`.
@@ -145,3 +148,18 @@ can return a `LintMessage` with `path = None`.
145
148
In the event a linter exits non-zero, it will be caught by `lintrunner`and
146
149
presented as a “general linter failure” with stdout/stderr shown to the user.
147
150
This should be considered a bug in the linter’s implementation of this protocol.
151
+
152
+
## Tips for adopting `lintrunner` in a new project
153
+
154
+
When adopting lintrunner in a previously un-linted project, it may generate a lot
155
+
of lint messages. You can use the `--output oneline` option to make
156
+
`lintrunner` display each lint message in its separate line to quickly navigate
157
+
through them.
158
+
159
+
Additionally, you can selectively run specific linters with the `--take` option,
160
+
like `--take RUFF,CLANGFORMAT`, to focus on resolving specific lint errors, or
161
+
use `--skip` to skip a long running linter like `MYPY`.
162
+
163
+
## GitHub Action
164
+
165
+
To use `lintrunner` in a GitHub workflow, you can consider [`lintrunner-action`](https://github.com/justinchuby/lintrunner-action).
0 commit comments