-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): migrate trunk.yaml to schema v0.1 (lint/fmt blocks) #626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,113 +1,70 @@ | ||
| # ============================================================================= | ||
| # Trunk.io — Plugin versions for linting/formatting tools | ||
| # Trunk.io — Lint/format configuration (schema v0.1) | ||
| # ============================================================================= | ||
| # This file is auto-generated. Run `trunk upgrade` to update. | ||
| # https://docs.trunk.io/check/reference | ||
| # Migrated 2026-08-09 from the legacy top-level linters/formatters/actions/ | ||
| # cache/env schema to version: 0.1 + lint/fmt blocks. Tool versions are | ||
| # trunk-io/plugins known-good versions; update with `trunk upgrade`. | ||
| # https://docs.trunk.io/ | ||
| # ============================================================================= | ||
|
|
||
| version: 0.1 | ||
|
|
||
| cli: | ||
| version: 1.22.2 | ||
|
|
||
| plugins: | ||
| sources: | ||
| - id: trunk | ||
| ref: v1.2.2 | ||
| - id: community | ||
| ref: main | ||
| ref: v1.6.1 | ||
| uri: https://github.com/trunk-io/plugins | ||
|
|
||
| # Linters (auto-detected by file type) | ||
| linters: | ||
| actionlint: | ||
| enabled: true | ||
| commands: | ||
| - name: actionlint | ||
| run: actionlint ${target} | ||
| direct_configs: | ||
| - .github/workflows/*.yml | ||
| black: | ||
| enabled: true | ||
| commands: | ||
| - name: black | ||
| run: black --check --line-length 100 ${target} | ||
| direct_configs: | ||
| - pyproject.toml | ||
| - ruff.toml | ||
| clippy: | ||
| enabled: true | ||
| commands: | ||
| - name: clippy | ||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||
| eslint: | ||
| enabled: true | ||
| direct_configs: | ||
| - .eslintrc.* | ||
| - eslint.config.* | ||
| golangci-lint: | ||
| enabled: true | ||
| direct_configs: | ||
| - .golangci.yml | ||
| - .golangci.yaml | ||
| mypy: | ||
| enabled: true | ||
| commands: | ||
| - name: mypy | ||
| run: mypy --ignore-missing-imports ${target} | ||
| ruff: | ||
| enabled: true | ||
| commands: | ||
| - name: ruff | ||
| run: ruff check --output-format=github ${target} | ||
| direct_configs: | ||
| - ruff.toml | ||
| - pyproject.toml | ||
| shellcheck: | ||
| enabled: true | ||
| taplo: | ||
| enabled: true | ||
| yamllint: | ||
| enabled: true | ||
| lint: | ||
| enabled: | ||
| - actionlint@1.7.8 | ||
| - black@25.9.0 | ||
| - clippy@1.65.0 | ||
| - eslint@8.10.0 | ||
| - golangci-lint@1.64.8 | ||
| - mypy@1.20.2 | ||
| - ruff@0.14.3 | ||
| - shellcheck@0.11.0 | ||
| - taplo@0.10.0 | ||
| - yamllint@1.37.1 | ||
| definitions: | ||
| - name: actionlint | ||
| commands: | ||
| - name: lint | ||
| run: actionlint ${target} | ||
| - name: black | ||
| commands: | ||
| - name: lint | ||
| run: black --check --line-length 100 ${target} | ||
| - name: clippy | ||
| commands: | ||
| - name: lint | ||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||
| - name: mypy | ||
| commands: | ||
| - name: lint | ||
| run: mypy --ignore-missing-imports ${target} | ||
| - name: ruff | ||
| commands: | ||
| - name: lint | ||
| run: ruff check --output-format=github ${target} | ||
|
|
||
| # Formatters | ||
| formatters: | ||
| black: | ||
| enabled: true | ||
| commands: | ||
| - name: black | ||
| run: black --line-length 100 ${target} | ||
| direct_configs: | ||
| - pyproject.toml | ||
| prettier: | ||
| enabled: true | ||
| direct_configs: | ||
| - .prettierrc | ||
| - prettier.config.* | ||
| rustfmt: | ||
| enabled: true | ||
| commands: | ||
| - name: rustfmt | ||
| run: rustfmt ${target} | ||
|
|
||
| # Actions (CI optimization) | ||
| actions: | ||
| trunk-check: | ||
| enabled: true | ||
| size: 5GB | ||
| memory: 16GB | ||
| disk: 10GB | ||
| trunk-merge: | ||
| enabled: true | ||
| size: 5GB | ||
| trunk-push: | ||
| enabled: true | ||
| size: 5GB | ||
|
|
||
| # Caching | ||
| cache: | ||
| enabled: true | ||
| storage: local | ||
|
|
||
| # CLI | ||
| cli: | ||
| version: 1.22.2 | ||
|
|
||
| # Environment | ||
| env: | ||
| variables: | ||
| EDITOR: vim | ||
| fmt: | ||
| enabled: | ||
| - black@25.9.0 | ||
| - prettier@3.6.2 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: Trunk v0.1 requires explicit command definitions for enabled formatters; Reply with |
||
| - rustfmt@1.65.0 | ||
| definitions: | ||
| - name: black | ||
| commands: | ||
| - name: format | ||
| run: black --line-length 100 ${target} | ||
| - name: rustfmt | ||
| commands: | ||
| - name: format | ||
| run: rustfmt ${target} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the Trunk Check workflow runs on a Rust change,
clippy@1.65.0makes the Trunk v1.6.1 clippy plugin download and place Rust/Clippy 1.65 first inPATH(the plugin usesdownload: rustand${linter}/bin). This workspace declaresrust-version = "1.75"inCargo.toml, so Cargo will reject the toolchain before linting; pin Clippy/Rustfmt to at least the workspace MSRV or use the CI toolchain instead.Useful? React with 👍 / 👎.