snippetbashTip
trunk — Run linters, formatters, and security analyzers on code. More information: <https://docs.trunk.io/co
Viewed 0 times
formatterscommandrunsecurityandclilinterstrunk
Problem
How to use the
trunk command: Run linters, formatters, and security analyzers on code. More information: <https://docs.trunk.io/code-quality/overview/getting-started/commands-reference>.Solution
trunk — Run linters, formatters, and security analyzers on code. More information: <https://docs.trunk.io/code-quality/overview/getting-started/commands-reference>.Initialize trunk in a repository:
trunk initRun all applicable linters and formatters on changed files:
trunk checkRun linters and formatters on specific files:
trunk check {{path/to/file1 path/to/file2 ...}}Format files in place:
trunk fmtList all available tools and their status:
trunk tools listEnable a tool at a specific version:
trunk tools enable {{tool}}@{{version}}Print an action's execution history:
trunk actions history {{action}}Code Snippets
Initialize trunk in a repository
trunk initRun all applicable linters and formatters on changed files
trunk checkRun linters and formatters on specific files
trunk check {{path/to/file1 path/to/file2 ...}}Format files in place
trunk fmtList all available tools and their status
trunk tools listContext
tldr-pages: common/trunk
Revisions (0)
No revisions yet.