@@ -30,10 +30,10 @@ lake_out lint --lint-only unusedVariables TextLints || true
3030match_pat ' Variable name `unusedLet` is not explicitly referenced' produced.out
3131no_match_pat ' missing doc string' produced.out
3232
33- # --builtin-lint should detect the defLemma violation in Main (the default target)
33+ # --builtin-lint should detect the defProp violation in Main (the default target)
3434lake_out lint --builtin-lint || true
3535match_pat ' shouldBeTheorem' produced.out
36- match_pat ' is a def, should be a lemma/theorem ' produced.out
36+ match_pat ' is a proposition; use `theorem` instead of `def` ' produced.out
3737# `@[reducible, instance]` on a `def` of Prop type keeps it a `def`, so flag it.
3838match_pat ' reducibleInstShouldBeTheorem' produced.out
3939# Plain `instance` of Prop type is elaborated as a theorem; it should not be flagged.
@@ -45,8 +45,8 @@ match_pat 'only occur together' produced.out
4545# builtin_nolint checkUnivs should suppress the warning
4646no_match_pat ' badUnivSkipped' produced.out
4747
48- # --lint-only defLemma should run only the defLemma linter
49- lake_out lint --lint-only defLemma || true
48+ # --lint-only defProp should run only the defProp linter
49+ lake_out lint --lint-only defProp || true
5050match_pat ' shouldBeTheorem' produced.out
5151no_match_pat ' badUnivDecl' produced.out
5252
@@ -57,8 +57,9 @@ no_match_pat 'badUnivDecl' produced.out
5757# package, so passing any module of a package flips the flag for every module
5858# in that package.
5959
60- # Env linters run post-build against `importModules`-loaded decls, so
61- # `defLemma` catches `shouldBeTheoremInSub` regardless of override scope.
60+ # `defProp` runs during the build of each module, so its warning for
61+ # `shouldBeTheoremInSub` is captured in `Main.Sub`'s lint log and re-emitted
62+ # via `collectTextLints` when `Main` is linted.
6263lake_out lint --builtin-lint Main || true
6364match_pat ' shouldBeTheoremInSub' produced.out
6465
@@ -81,7 +82,7 @@ test_run lint --builtin-only Clean
8182
8283# Without --extra, the extra linters (both the env linter and the dummy extra
8384# text linter in Linters.lean) must not run. Default linters still do, so the
84- # `defLemma` violation in this file fires.
85+ # default `defProp` linter's violation in this file fires.
8586lake_out lint --builtin-only ExtraViolations || true
8687no_match_pat ' badNameExtra' produced.out
8788no_match_pat ' extra text linter saw a declaration' produced.out
@@ -91,7 +92,7 @@ no_match_pat 'tac1 <;> tac2' produced.out
9192no_match_pat ' Dup.Dup.violation' produced.out
9293# Builtin extra text linter `unreachableTactic` is non-default, so silent.
9394no_match_pat ' this tactic is never executed' produced.out
94- # Default env linter `defLemma` runs and flags the def-of-Prop in this file.
95+ # Default `defProp` linter runs and flags the def-of-Prop in this file.
9596match_pat ' shouldBeTheoremUnderExtra' produced.out
9697
9798# --extra should run default linters together with the non-default (extra)
@@ -109,7 +110,7 @@ match_pat 'Dup.Dup.violation' produced.out
109110match_pat " namespace .*Dup.* is duplicated" produced.out
110111# Builtin `unreachableTactic` extra text linter fires under --extra.
111112match_pat ' this tactic is never executed' produced.out
112- # --extra also runs default linters, so `defLemma ` flags this file's violation.
113+ # --extra also runs default linters, so `defProp ` flags this file's violation.
113114match_pat ' shouldBeTheoremUnderExtra' produced.out
114115
115116# --extra on TextLints: default `linter.unusedVariables` fires (default
@@ -141,15 +142,15 @@ no_match_pat 'badNameExtra' produced.out
141142no_match_pat ' shouldBeTheorem' produced.out
142143
143144# Multiple --lint-only flags accumulate: both named linters should run
144- lake_out lint --lint-only defLemma --lint-only checkUnivs || true
145+ lake_out lint --lint-only defProp --lint-only checkUnivs || true
145146match_pat ' shouldBeTheorem' produced.out
146147match_pat ' badUnivDecl' produced.out
147148no_match_pat ' badNameExtra' produced.out
148149
149150# Last-wins: --extra overrides a prior --lint-all and clears --lint-only.
150- # Since --extra runs both default and extra linters, the default `defLemma `
151+ # Since --extra runs both default and extra linters, the default `defProp `
151152# violation in ExtraViolations.lean fires too.
152- lake_out lint --lint-all --lint-only defLemma --extra || true
153+ lake_out lint --lint-all --lint-only defProp --extra || true
153154match_pat ' badNameExtra' produced.out
154155match_pat ' shouldBeTheoremUnderExtra' produced.out
155156
@@ -160,13 +161,13 @@ match_pat 'badNameExtra' produced.out
160161match_pat ' shouldBeTheorem' produced.out
161162
162163# Last-wins: --extra clears a previously accumulated --lint-only. Default
163- # linters still run under --extra, so `defLemma ` fires on its file's violation.
164- lake_out lint --lint-only defLemma --extra || true
164+ # linters still run under --extra, so `defProp ` fires on its file's violation.
165+ lake_out lint --lint-only defProp --extra || true
165166match_pat ' badNameExtra' produced.out
166167match_pat ' shouldBeTheoremUnderExtra' produced.out
167168
168169# --lint-only after --extra: the named linter runs (selection ignores scope)
169- lake_out lint --extra --lint-only defLemma || true
170+ lake_out lint --extra --lint-only defProp || true
170171match_pat ' shouldBeTheorem' produced.out
171172no_match_pat ' badNameExtra' produced.out
172173
@@ -193,7 +194,7 @@ lake_out lint --extra ExtraViolations || true
193194match_pat ' badNameExtra' produced.out
194195
195196# --lint-only implicitly enables builtin lint
196- lake_out lint --lint-only defLemma || true
197+ lake_out lint --lint-only defProp || true
197198match_pat ' shouldBeTheorem' produced.out
198199
199200# builtinLint = false: check-lint fails (no lint driver and builtin linting disabled)
0 commit comments