Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Oct 20, 2024
1 parent 1f162b6 commit 049b779
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions test/Lint.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,13 @@ import Mathlib.Tactic.Linter.Lint
import Mathlib.Tactic.ToAdditive
import Mathlib.Order.SetNotation

-- TODO: the linter also runs on the #guard_msg, so disable it once
-- See https://leanprover.zulipchat.com/#narrow/stream/348111-std4/topic/.23guard_msgs.20doesn't.20silence.20warnings/near/423534679

set_option linter.dupNamespace false

namespace termG

-- this creates a hygienic declaration starting with `termG.termG.«_@».test.Lint...`
-- and the linter ignores it
set_option linter.dupNamespace true in
local notation "G" => Unit

/-- info: [termG, termG] -/
#guard_msgs in
open Lean in
run_meta
let env ← getEnv
let consts := env.constants.toList.find? (·.1.getRoot == `termG)
let reps := (consts.map (·.1.components.take 2)).getD default
logInfo m!"{reps}"
guard (reps[0]! == reps[1]!)
end termG

/--
Expand Down Expand Up @@ -70,9 +57,11 @@ namespace add
/--
warning: The namespace 'add' is duplicated in the declaration 'add.add'
note: this linter can be disabled with `set_option linter.dupNamespace false`
---
warning: The namespace 'add' is duplicated in the declaration 'add.add'
note: this linter can be disabled with `set_option linter.dupNamespace false`
-/
#guard_msgs in
set_option linter.dupNamespace true in
export Nat (add add_comm add)

end add
Expand Down

0 comments on commit 049b779

Please sign in to comment.