Skip to content

Commit b6b3fc8

Browse files
thorimurbryangingechen
authored andcommitted
chore: always include comment when importing header linter explicitly (leanprover-community#40729)
This PR makes sure we always includes the comment ``` -- Import this linter explicitly to ensure that -- this file has a valid copyright header and module docstring. ``` whenever `Mathlib.Tactic.Linter.Header` is imported explicitly. Some files already had this comment, and this PR just makes sure all of them do. We also normalize whitespace in adjacent `shake` annotations while we're at it. We could check for this in lint-style, but it would be easier after leanprover-community#40347.
1 parent 13808e5 commit b6b3fc8

12 files changed

Lines changed: 19 additions & 6 deletions

Mathlib/Lean/Elab/InfoTree.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public import Lean.Meta.TryThis
1111
public import Batteries.Tactic.Lint.Misc
1212
-- Import this linter explicitly to ensure that
1313
-- this file has a valid copyright header and module docstring.
14-
import Mathlib.Tactic.Linter.Header --shake: keep
14+
import Mathlib.Tactic.Linter.Header -- shake: keep
1515
public import Batteries.Tactic.Lint.Basic
1616
import Lean.Elab.Term.TermElabM
1717

Mathlib/Lean/Environment.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module
88
public import Lean.Environment
99
-- Import this linter explicitly to ensure that
1010
-- this file has a valid copyright header and module docstring.
11-
import Mathlib.Tactic.Linter.Header --shake: keep
11+
import Mathlib.Tactic.Linter.Header -- shake: keep
1212

1313
/-!
1414
# Additional utilities for `Lean.Environment`

Mathlib/Lean/Expr/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module
88

99
-- Import this linter explicitly to ensure that
1010
-- this file has a valid copyright header and module docstring.
11-
import Mathlib.Tactic.Linter.Header --shake: keep
11+
import Mathlib.Tactic.Linter.Header -- shake: keep
1212
public import Lean.Meta.AppBuilder
1313
public import Lean.Meta.Match.MatcherInfo
1414
public import Lean.Meta.Transform

Mathlib/Tactic/Linter/AuxLemma.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Authors: Kim Morrison
66
module
77

88
public meta import Lean.Elab.Command
9+
-- Import this linter explicitly to ensure that
10+
-- this file has a valid copyright header and module docstring.
911
public meta import Mathlib.Tactic.Linter.Header -- shake: keep
1012

1113
/-!

Mathlib/Tactic/Linter/DocString.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Authors: Michael Rothgang, Damiano Testa
55
-/
66
module
77

8+
-- Import this linter explicitly to ensure that
9+
-- this file has a valid copyright header and module docstring.
810
public meta import Mathlib.Tactic.Linter.Header -- shake: keep
911
public meta import Std.Data.Iterators.Combinators.Zip
1012
public import Lean.Parser.Command

Mathlib/Tactic/Linter/EmptyLine.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Authors: Damiano Testa
55
-/
66

77
module
8+
9+
-- Import this linter explicitly to ensure that
10+
-- this file has a valid copyright header and module docstring.
811
public meta import Mathlib.Tactic.Linter.Header -- shake: keep
912
public import Lean.Parser.Command
1013

Mathlib/Tactic/Linter/FlexibleLinter.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public meta import Lean.Elab.Command
99
public meta import Lean.Elab.Tactic.Simp
1010
public meta import Lean.Meta.Tactic.TryThis
1111
public meta import Lean.Server.InfoUtils
12+
-- Import this linter explicitly to ensure that
13+
-- this file has a valid copyright header and module docstring.
1214
public meta import Mathlib.Tactic.Linter.Header -- shake: keep
1315
public import Lean.Parser.Term
1416

Mathlib/Tactic/Linter/TacticDocumentation.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module
77

88
public meta import Lean.Elab.Tactic.Doc
99
public meta import Lean.Parser.Tactic.Doc
10+
-- Import this linter explicitly to ensure that
11+
-- this file has a valid copyright header and module docstring.
1012
public import Mathlib.Tactic.Linter.Header -- shake: keep
1113
public import Batteries.Tactic.Lint.Basic
1214
public import Lean.Elab.Tactic.Doc

Mathlib/Tactic/Linter/UnusedInstancesInType.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public meta import Mathlib.Lean.Elab.InfoTree
1111
public meta import Lean.Linter.Basic
1212
-- Import this linter explicitly to ensure that
1313
-- this file has a valid copyright header and module docstring.
14-
public import Mathlib.Tactic.Linter.Header --shake: keep
14+
public import Mathlib.Tactic.Linter.Header -- shake: keep
1515
public import Batteries.Tactic.Lint.Basic
1616
public import Batteries.Tactic.Lint.Misc
1717

Mathlib/Tactic/Linter/Whitespace.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Authors: Damiano Testa
55
-/
66
module
77

8+
-- Import this linter explicitly to ensure that
9+
-- this file has a valid copyright header and module docstring.
810
public import Mathlib.Tactic.Linter.Header -- shake: keep
911

1012
/-!

0 commit comments

Comments
 (0)