Skip to content

Commit 9efb969

Browse files
authored
docs: update README to include options and link to github action (#55)
1 parent 6e5bc4e commit 9efb969

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ you can run:
7575
lintrunner -m master
7676
```
7777

78+
### `--all-files`
79+
This will run lint on all files specified in `.lintrunner.toml`.
80+
7881
## Linter configuration
7982
`lintrunner` knows which linters to run and how by looking at a configuration
8083
file, conventionally named `.lintrunner.toml`.
@@ -145,3 +148,18 @@ can return a `LintMessage` with `path = None`.
145148
In the event a linter exits non-zero, it will be caught by `lintrunner`and
146149
presented as a “general linter failure” with stdout/stderr shown to the user.
147150
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

Comments
 (0)