Skip to content

Commit 141aa84

Browse files
committed
chore(contracts): make lint regenerate the betterer baseline
\`npm run lint\` ran \`betterer ci\`, which only checks \`.betterer.results\` and fails on any drift without rewriting it — so contributors editing contracts hit a ratchet failure that \`lint\` itself could not resolve. Point \`lint:ratchet\` at \`betterer --update\` so any \`lint\`/\`lint:fix\` run regenerates the baseline. The CI honest-baseline check moves to a new check-only \`lint:ratchet:ci\` (\`betterer ci\`), wired into 103-flow-ats-lint.yaml. The per-rule \`check-ratchet-vs-base.ts\` gate is unchanged, so warning increases are still blocked in CI. Signed-off-by: Miguel_LZPF <miguel.carpena@io.builders>
1 parent e3e09ad commit 141aa84

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/103-flow-ats-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
run: npm run compile --workspace=packages/ats/contracts
7171

7272
- name: Check baseline is honest (betterer ci)
73-
run: npm run lint:ratchet --workspace=packages/ats/contracts
73+
run: npm run lint:ratchet:ci --workspace=packages/ats/contracts
7474

7575
- name: Check baseline is not worse than base branch
7676
run: npx tsx packages/ats/contracts/scripts/ci/check-ratchet-vs-base.ts "${{ github.base_ref }}"

packages/ats/contracts/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@
6161
"format:check": "prettier --check .",
6262
"lint": "npm run lint:sol && npm run lint:js && npm run lint:ratchet",
6363
"lint:fix": "npm run lint:sol:fix; npm run lint:js:fix; npm run lint:ratchet:update",
64-
"lint:ratchet": "npm run generate:accessors:prod && betterer ci",
65-
"lint:ratchet:update": "npm run generate:accessors:prod && betterer",
64+
"lint:ratchet": "npm run generate:accessors:prod && betterer --update",
65+
"lint:ratchet:ci": "npm run generate:accessors:prod && betterer ci",
66+
"lint:ratchet:update": "npm run lint:ratchet",
6667
"lint:ratchet:merge": "betterer merge",
6768
"generate:accessors": "npx tsx scripts/tools/accessor-generator/index.ts",
6869
"generate:accessors:prod": "ATS_TEST_MODE=false npx tsx scripts/tools/accessor-generator/index.ts",

0 commit comments

Comments
 (0)