Skip to content

Commit 52a17fb

Browse files
Fixup code quality restructure (#335)
1 parent 728f7f2 commit 52a17fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1112
-736
lines changed

.gitbook.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,6 @@ redirects:
7878
test-analytics/frameworks/swift-testing: flaky-tests/frameworks/swift-testing.md
7979
test-analytics/frameworks/xctest: flaky-tests/frameworks/xctest.md
8080
test-analytics/github-pull-request-comments: flaky-tests/github-pull-request-comments.md
81+
/runtimes: /cli/configuration/runtimes
82+
/check/configuration: /cli/configuration
83+
/plugins: /cli/configuration/plugins

code-quality/linters/supported/README.md

+68-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,77 @@ description: Trunk Code Quality supports over 100 linters and formatters
44

55
# Supported Linters
66

7-
{% hint style="info" %}
8-
📘 Our linter integrations are open-source!
9-
10-
You can find them at [`trunk-io/plugins`](https://github.com/trunk-io/plugins).
11-
{% endhint %}
7+
> 📘 Our linter integrations are open-source!
8+
>
9+
> You can find them at [`trunk-io/plugins`](https://github.com/trunk-io/plugins).
1210
1311
Enable any of the following tools with:
1412

1513
```
1614
trunk check enable <linter>
1715
```
16+
17+
[//]: #
18+
[//]: # "1. Support for Detekt is under active development; see our [docs](https://docs.trunk.io/docs/code-quality/supported-linters#detekt) for more details."
19+
[//]: # "2. [Module inspection](https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/module-inspection.md), [deep checking](https://github.com/terraform-linters/tflint-ruleset-aws/blob/master/docs/deep_checking.md), and setting variables are not currently supported."
20+
[//]: #
21+
[//]: # "### Linter-specific Configuration"
22+
[//]: #
23+
[//]: # "Some linters require a bit more modification to properly set up. View page for the particular linter for more info."
24+
25+
| Technology | Linters |
26+
| ---------- | ------- |
27+
| All | [codespell](./codespell.md), [cspell](./cspell.md), [git-diff-check](./git-diff-check.md), [gitleaks](./gitleaks.md), [pre-commit-hooks](./pre-commit-hooks.md)|
28+
| Ansible | [ansible-lint](./ansible-lint.md)|
29+
| Apex | [pmd](./pmd.md)|
30+
| Bash | [shellcheck](./shellcheck.md), [shfmt](./shfmt.md)|
31+
| Bazel, Starlark | [buildifier](./buildifier.md)|
32+
| C# | [dotnet-format](./dotnet-format.md)|
33+
| C, C++ | [clang-format](./clang-format.md), [clang-tidy](./clang-tidy.md), [cmake-format](./cmake-format.md), [iwyu](./iwyu.md), [pragma-once](./pragma-once.md)|
34+
| CircleCI Config | [circleci](./circleci.md)|
35+
| Cloudformation | [cfnlint](./cfnlint.md), [checkov](./checkov.md)|
36+
| CSS, SCSS | [prettier](./prettier.md), [stylelint](./stylelint.md)|
37+
| Cue | [cue-fmt](./cue-fmt.md)|
38+
| Dart | [dart](./dart.md)|
39+
| Docker | [checkov](./checkov.md), [hadolint](./hadolint.md)|
40+
| Dotenv | [dotenv-linter](./dotenv-linter.md)|
41+
| GitHub | [actionlint](./actionlint.md)|
42+
| Go | [gofmt](./gofmt.md), [gofumpt](./gofumpt.md), [goimports](./goimports.md), [gokart](./gokart.md), [golangci-lint](./golangci-lint.md), [golines](./golines.md), [semgrep](./semgrep.md)|
43+
| GraphQL | [graphql-schema-linter](./graphql-schema-linter.md), [prettier](./prettier.md)|
44+
| HAML | [haml-lint](./haml-lint.md)|
45+
| HTML Templates | [djlint](./djlint.md)|
46+
| Java | [google-java-format](./google-java-format.md), [pmd](./pmd.md), [semgrep](./semgrep.md)|
47+
| JavaScript | [biome](./biome.md), [deno](./deno.md), [eslint](./eslint.md), [prettier](./prettier.md), [rome](./rome.md), [semgrep](./semgrep.md)|
48+
| JSON | [deno](./deno.md), [eslint](./eslint.md), [prettier](./prettier.md), [semgrep](./semgrep.md)|
49+
| json | [biome](./biome.md)|
50+
| jsx | [biome](./biome.md)|
51+
| Kotlin | [detekt](./detekt.md), [ktlint](./ktlint.md)|
52+
| Kubernetes | [kube-linter](./kube-linter.md)|
53+
| Lua | [stylua](./stylua.md)|
54+
| Markdown | [deno](./deno.md), [markdown-link-check](./markdown-link-check.md), [markdown-table-prettify](./markdown-table-prettify.md), [markdownlint](./markdownlint.md), [prettier](./prettier.md), [remark-lint](./remark-lint.md)|
55+
| Nix | [nixpkgs-fmt](./nixpkgs-fmt.md)|
56+
| package.json | [sort-package-json](./sort-package-json.md)|
57+
| Perl | [perlcritic](./perlcritic.md), [perltidy](./perltidy.md)|
58+
| PHP | [php-cs-fixer](./php-cs-fixer.md), [phpstan](./phpstan.md)|
59+
| PNG | [oxipng](./oxipng.md)|
60+
| PowerShell | [psscriptanalyzer](./psscriptanalyzer.md)|
61+
| Prisma | [prisma](./prisma.md)|
62+
| prose | [vale](./vale.md)|
63+
| Protobuf | [buf](./buf.md), [clang-format](./clang-format.md), [clang-tidy](./clang-tidy.md)|
64+
| Python | [autopep8](./autopep8.md), [bandit](./bandit.md), [black](./black.md), [flake8](./flake8.md), [isort](./isort.md), [mypy](./mypy.md), [pylint](./pylint.md), [pyright](./pyright.md), [ruff](./ruff.md), [semgrep](./semgrep.md), [sourcery](./sourcery.md), [yapf](./yapf.md)|
65+
| Rego | [opa](./opa.md), [regal](./regal.md)|
66+
| Renovate | [renovate](./renovate.md)|
67+
| Ruby | [brakeman](./brakeman.md), [rubocop](./rubocop.md), [rufo](./rufo.md), [semgrep](./semgrep.md), [standardrb](./standardrb.md)|
68+
| Rust | [clippy](./clippy.md), [rustfmt](./rustfmt.md)|
69+
| Scala | [scalafmt](./scalafmt.md)|
70+
| Security | [checkov](./checkov.md), [dustilock](./dustilock.md), [nancy](./nancy.md), [osv-scanner](./osv-scanner.md), [terrascan](./terrascan.md), [tfsec](./tfsec.md), [trivy](./trivy.md), [trufflehog](./trufflehog.md)|
71+
| SQL | [sql-formatter](./sql-formatter.md), [sqlfluff](./sqlfluff.md), [sqlfmt](./sqlfmt.md)|
72+
| SVG | [svgo](./svgo.md)|
73+
| Swift | [stringslint](./stringslint.md), [swiftformat](./swiftformat.md), [swiftlint](./swiftlint.md)|
74+
| Terraform | [checkov](./checkov.md), [terraform](./terraform.md), [terrascan](./terrascan.md), [tflint](./tflint.md), [tfsec](./tfsec.md), [tofu](./tofu.md)|
75+
| Terragrunt | [terragrunt](./terragrunt.md)|
76+
| Terrascan | [terrascan](./terrascan.md)|
77+
| Textproto | [txtpbfmt](./txtpbfmt.md)|
78+
| TOML | [taplo](./taplo.md)|
79+
| TypeScript | [biome](./biome.md), [deno](./deno.md), [eslint](./eslint.md), [prettier](./prettier.md), [rome](./rome.md), [semgrep](./semgrep.md)|
80+
| YAML | [prettier](./prettier.md), [semgrep](./semgrep.md), [yamllint](./yamllint.md)|

code-quality/linters/supported/actionlint.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: >-
3-
Explore our guide on Actionlint, the linter for Github Actions. Learn about
4-
its features, installation, and configuration.
2+
description: Explore our guide on Actionlint, the linter for Github Actions. Learn about its features, installation, and configuration.
3+
title: Trunk | How to run Actionlint
54
layout:
65
title:
76
visible: true
@@ -27,19 +26,21 @@ trunk check enable actionlint
2726

2827
## Auto Enabling
2928

30-
Actionlint will be auto-enabled if any _Github-workflow_ files are present.
29+
Actionlint will be auto-enabled if any *Github-workflow* files are present.
3130

3231
## Settings
3332

3433
Actionlint supports the following config files:
35-
3634
* `.github/actionlint.yaml`
3735
* `.github/actionlint.yml`
3836

3937
Unlike with most tools under `trunk check`, these files cannot be moved.
4038

39+
40+
41+
4142
## Links
4243

43-
* [Actionlint site](https://github.com/rhysd/actionlint)
44-
* Actionlint Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/actionlint)
45-
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
44+
- [Actionlint site](https://github.com/rhysd/actionlint)
45+
- Actionlint Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/actionlint)
46+
- Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)

code-quality/linters/supported/ansible-lint.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: >-
3-
Checks playbooks for practices and behavior that could potentially be improved
4-
and can fix some of the most common ones for you
2+
description: Checks playbooks for practices and behavior that could potentially be improved and can fix some of the most common ones for you
3+
title: Trunk | How to run Ansible-lint
54
layout:
65
title:
76
visible: true
@@ -32,19 +31,23 @@ Ansible-lint will never be auto-enabled. It must be enabled manually.
3231
## Settings
3332

3433
Ansible-lint supports the following config files:
35-
3634
* `.ansible-lint`
3735

38-
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](broken-reference) for more info.
36+
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](..#moving-linter-configs) for more info.
37+
3938

4039
## Usage Notes
4140

42-
**Ansible-lint** must be configured with a trigger. See the [trigger rules](broken-reference) documentation for more information.
41+
**Ansible-lint** must be configured with a trigger. See the [trigger rules](../#trigger-rules) documentation for more information.
4342

4443
If your ansible setup is not contained within a single folder you would list all files and directories belonging to your ansible setup.
4544

45+
46+
47+
48+
4649
## Links
4750

48-
* [Ansible-lint site](https://github.com/ansible/ansible-lint)
49-
* Ansible-lint Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/ansible-lint)
50-
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
51+
- [Ansible-lint site](https://github.com/ansible/ansible-lint)
52+
- Ansible-lint Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/ansible-lint)
53+
- Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)

code-quality/linters/supported/autopep8.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: autopep8 is a linter for Python
3+
title: Trunk | How to run autopep8
34
layout:
45
title:
56
visible: true
@@ -22,23 +23,23 @@ You can enable the autopep8 linter with:
2223
```shell
2324
trunk check enable autopep8
2425
```
25-
26-
![autopep8 example output](../../configuration/supported/autopep8.gif)
27-
26+
![autopep8 example output](./autopep8.gif)
2827
## Auto Enabling
2928

3029
autopep8 will be auto-enabled if a `.pep8` config file is present.
3130

3231
## Settings
3332

3433
autopep8 supports the following config files:
35-
3634
* `.pep8`
3735

38-
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](broken-reference) for more info.
36+
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](..#moving-linter-configs) for more info.
37+
38+
39+
3940

4041
## Links
4142

42-
* [autopep8 site](https://github.com/hhatto/autopep8#readme)
43-
* autopep8 Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/autopep8)
44-
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
43+
- [autopep8 site](https://github.com/hhatto/autopep8#readme)
44+
- autopep8 Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/autopep8)
45+
- Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)

code-quality/linters/supported/bandit.md

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
2-
description: >-
3-
Bandit is a security linter for Python codebases. Bandit flags problems like
4-
hard-coded passwords, injection vulnerabilities, and the use of insecure
5-
libraries.
2+
description: Bandit is a security linter for Python codebases. Bandit flags problems like hard-coded passwords, injection vulnerabilities, and the use of insecure libraries.
3+
title: Trunk | How to run Bandit
64
layout:
75
title:
86
visible: true
@@ -25,23 +23,23 @@ You can enable the Bandit linter with:
2523
```shell
2624
trunk check enable bandit
2725
```
28-
29-
![bandit example output](../../configuration/supported/bandit.gif)
30-
26+
![bandit example output](./bandit.gif)
3127
## Auto Enabling
3228

33-
Bandit will be auto-enabled if any _Python_ files are present.
29+
Bandit will be auto-enabled if any *Python* files are present.
3430

3531
## Settings
3632

3733
Bandit supports the following config files:
38-
3934
* `.bandit`
4035

41-
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](broken-reference) for more info.
36+
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](..#moving-linter-configs) for more info.
37+
38+
39+
4240

4341
## Links
4442

45-
* [Bandit site](https://github.com/PyCQA/bandit)
46-
* Bandit Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/bandit)
47-
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
43+
- [Bandit site](https://github.com/PyCQA/bandit)
44+
- Bandit Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/bandit)
45+
- Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)

code-quality/linters/supported/biome.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: biome is a linter for JavaScript, TypeScript, jsx and json
3+
title: Trunk | How to run biome
34
layout:
45
title:
56
visible: true
@@ -25,19 +26,21 @@ trunk check enable biome
2526

2627
## Auto Enabling
2728

28-
biome will be auto-enabled if any of its config files are present: _`biome.json`, `rome.json`_.
29+
biome will be auto-enabled if any of its config files are present: *`biome.json`, `rome.json`*.
2930

3031
## Settings
3132

3233
biome supports the following config files:
33-
3434
* `biome.json`
3535
* `rome.json`
3636

37-
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](broken-reference) for more info.
37+
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](..#moving-linter-configs) for more info.
38+
39+
40+
3841

3942
## Links
4043

41-
* [biome site](https://biomejs.dev/)
42-
* biome Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/biome)
43-
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
44+
- [biome site](https://biomejs.dev/)
45+
- biome Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/biome)
46+
- Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)

code-quality/linters/supported/black.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: >-
3-
Discover Black, the Python code formatter. Learn how to integrate it with
4-
Trunk Check for seamless coding style enforcement.
2+
description: Discover Black, the Python code formatter. Learn how to integrate it with Trunk Check for seamless coding style enforcement.
3+
title: Trunk | How to run Black
54
layout:
65
title:
76
visible: true
@@ -24,15 +23,17 @@ You can enable the Black formatter with:
2423
```shell
2524
trunk check enable black
2625
```
26+
![black example output](./black.gif)
27+
## Auto Enabling
28+
29+
Black will be auto-enabled if any *Python, Jupyter or Python-interface* files are present.
30+
2731

28-
![black example output](../../configuration/supported/black.gif)
2932

30-
## Auto Enabling
3133

32-
Black will be auto-enabled if any _Python, Jupyter or Python-interface_ files are present.
3334

3435
## Links
3536

36-
* [Black site](https://pypi.org/project/black/)
37-
* Black Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/black)
38-
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
37+
- [Black site](https://pypi.org/project/black/)
38+
- Black Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/black)
39+
- Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)

code-quality/linters/supported/brakeman.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
description: >-
3-
Brakeman is a static analysis tool designed for Ruby on Rails applications. It
4-
statically analyzes Rails application code to find security issues.
2+
description: Brakeman is a static analysis tool designed for Ruby on Rails applications. It statically analyzes Rails application code to find security issues.
3+
title: Trunk | How to run Brakeman
54
layout:
65
title:
76
visible: true
@@ -27,18 +26,20 @@ trunk check enable brakeman
2726

2827
## Auto Enabling
2928

30-
Brakeman will be auto-enabled if any _Ruby_ files are present.
29+
Brakeman will be auto-enabled if any *Ruby* files are present.
3130

3231
## Settings
3332

3433
Brakeman supports the following config files:
35-
3634
* `brakeman.ignore`
3735

38-
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](broken-reference) for more info.
36+
You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linter Configs](..#moving-linter-configs) for more info.
37+
38+
39+
3940

4041
## Links
4142

42-
* [Brakeman site](https://github.com/presidentbeef/brakeman)
43-
* Brakeman Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/brakeman)
44-
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
43+
- [Brakeman site](https://github.com/presidentbeef/brakeman)
44+
- Brakeman Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/brakeman)
45+
- Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)

0 commit comments

Comments
 (0)