Skip to content

Commit fe62944

Browse files
committed
fix(ci): replace taplo with azldev for TOML validation
taplo lint was validating TOML files against a static JSON schema that drifts out of date whenever azldev adds new config fields, causing spurious CI failures on valid configs. Replace the Rust/taplo toolchain with azldev, which is the authoritative parser for these files: - "azldev config dump -q" validates syntax, schema, includes, and full config resolution in strict mode (fails on unknown fields). - "azldev config generate-schema" + diff ensures the checked-in schema stays in sync, with a clear error message if it drifts. Delete taplo.toml since taplo is no longer used in CI.
1 parent 921d29a commit fe62944

2 files changed

Lines changed: 17 additions & 19 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,31 @@ permissions:
1515

1616
jobs:
1717
lint:
18-
name: "Lint TOML files"
18+
name: "Validate TOML config"
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2323
with:
2424
persist-credentials: false
25-
26-
- name: Set up rust toolchain
27-
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2828
with:
29-
toolchain: stable
29+
go-version: stable
30+
cache: false
3031

31-
- name: Enable cargo cache
32-
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
32+
- name: Install azldev
33+
run: go install github.com/microsoft/azure-linux-dev-tools/cmd/azldev@main
3334

34-
- name: "Install linter (taplo)"
35-
run: cargo install --locked taplo-cli
35+
- name: "Validate config (strict)"
36+
run: azldev config dump -q > /dev/null
3637

37-
- name: "Run linter"
38-
run: taplo lint --colors=always
38+
- name: "Check schema freshness"
39+
run: |
40+
azldev config generate-schema > /tmp/azldev.schema.json
41+
if ! diff -u external/schemas/azldev.schema.json /tmp/azldev.schema.json; then
42+
echo "::error::Checked-in schema is out of date. Run: azldev config generate-schema > external/schemas/azldev.schema.json"
43+
exit 1
44+
fi
3945

taplo.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)