Skip to content

Commit d7b053b

Browse files
kim-emclaude
andauthored
feat: add tech debt counter for disabled varHead simp warnings (#21)
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 ca00491 commit d7b053b

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
@@ -136,6 +136,8 @@ doubleDeprecs="$(git grep -A2 -- "set_option linter.deprecated false" -- ":^Math
136136

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

139+
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"
140+
139141
printf '%s|%s\n' "$(grep -c 'docBlame' scripts/nolints.json)" "documentation nolint entries"
140142
printf '%s|%s\n' "$(grep -c 'tacticDocs' scripts/nolints.json)" "undocumented tactics"
141143
# We count the number of large files, making sure to avoid counting the test file `MathlibTest/Lint.lean`.

0 commit comments

Comments
 (0)