./pants lint [args]
Run all linters and/or formatters in check mode.
Only run these linters and skip all others.
The linter names are outputted at the final summary of running this goal, e.g.
shellcheck. You can also run
lint --only=fake to get a list of all activated linters.
You can repeat this option, e.g.
lint --only=flake8 --only=shellcheck or
lint --only=['flake8', 'shellcheck'].
The target number of files to be included in each linter batch.
Linter processes are batched for a few reasons:
- to avoid OS argument length limits (in processes which don't support argument files)
- to support more stable cache keys than would be possible if all files were operated on in a single batch.
- to allow for parallelism in linter processes which don't have internal parallelism, or -- if they do support internal parallelism -- to improve scheduling behavior when multiple processes are competing for cores and so internal parallelism cannot be used perfectly.
In order to improve cache hit rates (see 2.), batches are created at stable boundaries, and so this value is only a "target" batch size (rather than an exact value).
Updated 27 days ago