Skip to content

Commit 3a4c0fd

Browse files
authored
fix(ci): migrate trunk.yaml to schema v0.1 (lint/fmt blocks) (#626)
The legacy trunk.yaml (top-level linters/formatters/actions/cache/env) is rejected by the current trunk CLI with config-errors ('missing config version, please add version: 0.1', unrecognized keys), which has been failing the Trunk Check job. Migrate to schema v0.1 with lint.enabled / lint.definitions (preserving the custom actionlint, black --line-length 100, clippy -D warnings, mypy, ruff commands) and fmt.enabled / fmt.definitions (preserving black --line-length 100 and rustfmt commands). Versions are trunk-io/plugins known-good versions; the community plugin source and the legacy actions/cache/env blocks are dropped (defaults apply).
1 parent 1018986 commit 3a4c0fd

1 file changed

Lines changed: 59 additions & 102 deletions

File tree

.trunk/trunk.yaml

Lines changed: 59 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,70 @@
11
# =============================================================================
2-
# Trunk.io — Plugin versions for linting/formatting tools
2+
# Trunk.io — Lint/format configuration (schema v0.1)
33
# =============================================================================
4-
# This file is auto-generated. Run `trunk upgrade` to update.
5-
# https://docs.trunk.io/check/reference
4+
# Migrated 2026-08-09 from the legacy top-level linters/formatters/actions/
5+
# cache/env schema to version: 0.1 + lint/fmt blocks. Tool versions are
6+
# trunk-io/plugins known-good versions; update with `trunk upgrade`.
7+
# https://docs.trunk.io/
68
# =============================================================================
79

10+
version: 0.1
11+
12+
cli:
13+
version: 1.22.2
14+
815
plugins:
916
sources:
1017
- id: trunk
11-
ref: v1.2.2
12-
- id: community
13-
ref: main
18+
ref: v1.6.1
19+
uri: https://github.com/trunk-io/plugins
1420

1521
# Linters (auto-detected by file type)
16-
linters:
17-
actionlint:
18-
enabled: true
19-
commands:
20-
- name: actionlint
21-
run: actionlint ${target}
22-
direct_configs:
23-
- .github/workflows/*.yml
24-
black:
25-
enabled: true
26-
commands:
27-
- name: black
28-
run: black --check --line-length 100 ${target}
29-
direct_configs:
30-
- pyproject.toml
31-
- ruff.toml
32-
clippy:
33-
enabled: true
34-
commands:
35-
- name: clippy
36-
run: cargo clippy --all-targets --all-features -- -D warnings
37-
eslint:
38-
enabled: true
39-
direct_configs:
40-
- .eslintrc.*
41-
- eslint.config.*
42-
golangci-lint:
43-
enabled: true
44-
direct_configs:
45-
- .golangci.yml
46-
- .golangci.yaml
47-
mypy:
48-
enabled: true
49-
commands:
50-
- name: mypy
51-
run: mypy --ignore-missing-imports ${target}
52-
ruff:
53-
enabled: true
54-
commands:
55-
- name: ruff
56-
run: ruff check --output-format=github ${target}
57-
direct_configs:
58-
- ruff.toml
59-
- pyproject.toml
60-
shellcheck:
61-
enabled: true
62-
taplo:
63-
enabled: true
64-
yamllint:
65-
enabled: true
22+
lint:
23+
enabled:
24+
- actionlint@1.7.8
25+
- black@25.9.0
26+
- clippy@1.65.0
27+
- eslint@8.10.0
28+
- golangci-lint@1.64.8
29+
- mypy@1.20.2
30+
- ruff@0.14.3
31+
- shellcheck@0.11.0
32+
- taplo@0.10.0
33+
- yamllint@1.37.1
34+
definitions:
35+
- name: actionlint
36+
commands:
37+
- name: lint
38+
run: actionlint ${target}
39+
- name: black
40+
commands:
41+
- name: lint
42+
run: black --check --line-length 100 ${target}
43+
- name: clippy
44+
commands:
45+
- name: lint
46+
run: cargo clippy --all-targets --all-features -- -D warnings
47+
- name: mypy
48+
commands:
49+
- name: lint
50+
run: mypy --ignore-missing-imports ${target}
51+
- name: ruff
52+
commands:
53+
- name: lint
54+
run: ruff check --output-format=github ${target}
6655

6756
# Formatters
68-
formatters:
69-
black:
70-
enabled: true
71-
commands:
72-
- name: black
73-
run: black --line-length 100 ${target}
74-
direct_configs:
75-
- pyproject.toml
76-
prettier:
77-
enabled: true
78-
direct_configs:
79-
- .prettierrc
80-
- prettier.config.*
81-
rustfmt:
82-
enabled: true
83-
commands:
84-
- name: rustfmt
85-
run: rustfmt ${target}
86-
87-
# Actions (CI optimization)
88-
actions:
89-
trunk-check:
90-
enabled: true
91-
size: 5GB
92-
memory: 16GB
93-
disk: 10GB
94-
trunk-merge:
95-
enabled: true
96-
size: 5GB
97-
trunk-push:
98-
enabled: true
99-
size: 5GB
100-
101-
# Caching
102-
cache:
103-
enabled: true
104-
storage: local
105-
106-
# CLI
107-
cli:
108-
version: 1.22.2
109-
110-
# Environment
111-
env:
112-
variables:
113-
EDITOR: vim
57+
fmt:
58+
enabled:
59+
- black@25.9.0
60+
- prettier@3.6.2
61+
- rustfmt@1.65.0
62+
definitions:
63+
- name: black
64+
commands:
65+
- name: format
66+
run: black --line-length 100 ${target}
67+
- name: rustfmt
68+
commands:
69+
- name: format
70+
run: rustfmt ${target}

0 commit comments

Comments
 (0)