mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
38 lines
756 B
Io
38 lines
756 B
Io
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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 init`
|
|
|
|
- Run all applicable linters and formatters on changed files:
|
|
|
|
`trunk check`
|
|
|
|
- Run linters and formatters on specific files:
|
|
|
|
`trunk check {{path/to/file1 path/to/file2 ...}}`
|
|
|
|
- Format files in place:
|
|
|
|
`trunk fmt`
|
|
|
|
- List all available tools and their status:
|
|
|
|
`trunk tools list`
|
|
|
|
- Enable a tool at a specific version:
|
|
|
|
`trunk tools enable {{tool}}@{{version}}`
|
|
|
|
- Print an action's execution history:
|
|
|
|
`trunk actions history {{action}}`
|