Skip to content

Commit 40b6a8f

Browse files
grunwegjoneugster
andcommitted
chore(MathlibTest): move test files for linters into the Linter subdirectory (#40397)
This means we can use the auto-labelling mechanism to also suggest appropriate labels for these files. Co-authored-by: Jon Eugster <eugster.jon@gmail.com>
1 parent 59a563a commit 40b6a8f

13 files changed

Lines changed: 11 additions & 11 deletions

File tree

Mathlib/Tactic/Linter/Header.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ The set of files outside the `Mathlib` package to run the header style linter on
366366
because they are files that test the linter.
367367
-/
368368
def headerTestFiles : NameSet := .ofList
369-
[`MathlibTest.Header, `MathlibTest.HeaderFail, `MathlibTest.VersoHeader, `MathlibTest.DirectoryDependencyLinter.Test]
369+
[`MathlibTest.Linter.Header.Basic, `MathlibTest.Linter.Header.Fail, `MathlibTest.Linter.Header.Verso,
370+
`MathlibTest.DirectoryDependencyLinter.Test]
370371

371372
@[inherit_doc Mathlib.Linter.linter.style.header]
372373
def headerLinter : Linter where run := withSetOptionIn fun stx ↦ do
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ Note: This linter can be disabled with `set_option linter.style.nameCheck false`
1818
-/
1919
#guard_msgs in
2020
def double__underscore : Unit := ()
21+
22+
/--
23+
warning: The declaration 'double__underscore'' contains '__', which does not follow the mathlib naming conventions. Consider using single underscores instead.
24+
25+
Note: This linter can be disabled with `set_option linter.style.nameCheck false`
26+
-/
27+
#guard_msgs in
28+
set_option linter.style.nameCheck true in
29+
theorem double__underscore' : True := trivial
Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,3 @@ Note: This linter can be disabled with `set_option linter.dupNamespace false`
6262
export Nat (add add_comm add)
6363

6464
end add
65-
66-
/--
67-
warning: The declaration 'double__underscore' contains '__',
68-
which does not follow the mathlib naming conventions. Consider using single underscores instead.
69-
70-
Note: This linter can be disabled with `set_option linter.style.nameCheck false`
71-
-/
72-
#guard_msgs in
73-
set_option linter.style.nameCheck true in
74-
theorem double__underscore : True := trivial

0 commit comments

Comments
 (0)