Skip to content

Commit 87418d6

Browse files
kim-emclaude
andcommitted
feat: add tech debt counter for disabled varHead simp warnings
This PR adds a counter for `set_option warning.simp.varHead false` occurrences to the weekly tech debt report. The `warning.simp.varHead` option silences a warning introduced in Lean about simp lemmas whose LHS has a metavariable as its head. Places where this warning is silenced are tech debt we want to track over time. Prompted by discussion on leanprover-community/mathlib4-nightly-testing#209 which adds several `set_option warning.simp.varHead false in` uses. 🤖 Prepared with Claude Code Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8c3d31d commit 87418d6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/reporting/technical-debt-metrics.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ doubleDeprecs="$(git grep -A2 -- "set_option linter.deprecated false" -- ":^Math
132132

133133
printf '%s|disabled deprecation lints\n' "$(( deprecs - doubleDeprecs ))"
134134

135+
printf '%s|%s\n' "$({ git grep -c 'set_option warning.simp.varHead false' -- Mathlib Archive Counterexamples || true; } | awk -F: 'BEGIN{s=0}{s+=$2} END{print s}')" "disabled varHead simp warnings"
136+
135137
printf '%s|%s\n' "$(grep -c 'docBlame' scripts/nolints.json)" "documentation nolint entries"
136138
printf '%s|%s\n' "$(grep -c 'tacticDocs' scripts/nolints.json)" "undocumented tactics"
137139
# We count the number of large files, making sure to avoid counting the test file `MathlibTest/Lint.lean`.

0 commit comments

Comments
 (0)