forked from leanprover-community/mathlib4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhasOnlyPrivate.lean
More file actions
30 lines (21 loc) · 784 Bytes
/
hasOnlyPrivate.lean
File metadata and controls
30 lines (21 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module
import Mathlib.Init
import all Mathlib.Tactic.Linter.PrivateModule
import Lean.Elab.Command
open Lean
set_option linter.mathlibStandardSet true
theorem foo : True := trivial
def bar : Bool := true
-- Run the linter on artificial `eoi` syntax so that we can actually guard the message
open Mathlib.Linter Parser in
/--
warning: The current module only contains private declarations.
Consider adding `@[expose] public section` at the beginning of the module, or selectively marking declarations as `public`.
Note: This linter can be disabled with `set_option linter.privateModule false`
-/
#guard_msgs in
run_cmd do
let eoi := mkNode ``Command.eoi #[mkAtom .none ""]
privateModule.run eoi
-- Disable so that this test is silent
set_option linter.privateModule false