CLI options
Trunk Check detailed command line options
Options
options | |
---|---|
| Run on all the files in the repository. Useful if trying to assess a new linter in the system, or to find and fix pre-existing issues |
| Auto-apply all suggested fixes |
| Surface, but do not prompt for autofixes |
| List of comma-separated linters to run. Specify |
| Run check on a sampling of all files in the repo |
| Run in Continuous Integration mode |
| Do not show progress while running |
| Only show progress every 30s while running (useful for CI jobs). Implied by |
| number of concurrent jobs (does not affect background linting) |
| Output help information |
Advanced Trunk Check Features
Options & Flags | Explanation |
---|---|
| Explicitly set the root of the repository to run against |
| Specify the upstream branch used to calculate new vs existing issued. |
| Supports running trunk check from inside a git hook. Options are manual (default), git-push, git-commit. Controls whether the check returns early and its interactivity. |
| Output results in specified format: |
| Write json results to specified file |
Details
--filter
--filter
argument allows you to restrict trunk check
to a subset of the linters enabled in your repository.
For example, to run eslint
and isort
on the entire repo:
Alternatively, to run every linter except clang-tidy
and shellcheck
:
--sample
--sample=N
will attempt to run every enabled linter against the requested number of files. The goal of the sample
flag is to test the setup of the linters in your repository as well as any specific configuration they might honor.
The sample command will attempt to run each linter N times, but may run fewer if not enough applicable files exist in your set of files to lint. --sample=N
can be combined with any other set of options for trunk check
.
For example, to run prettier
against 10 different prettier supported files:
Alternatively, to run every linter at most 5 times against its supported files:
Last updated