11# Commands
22
3- Mathlib version: ` a8071348b19ed841a1f46dbd5a25d109bc804711 `
3+ Mathlib version: ` b30c0393ac6454d5d43ee1d1a6760c1939a2302b `
44
55## \# adaptation_note
66Defined in: ` adaptationNoteCmd `
@@ -463,7 +463,8 @@ In general, `#guard_msgs` accepts a comma-separated list of configuration clause
463463``` lean
464464#guard_msgs (configElt,*) in cmd
465465```
466- By default, the configuration list is ` (check all, whitespace := normalized, ordering := exact) ` .
466+ By default, the configuration list is
467+ ` (check all, whitespace := normalized, ordering := exact, positions := false) ` .
467468
468469Message filters select messages by severity:
469470- ` info ` , ` warning ` , ` error ` : (non-trace) messages with the given severity level.
@@ -489,6 +490,11 @@ Message ordering:
489490- ` ordering := sorted ` sorts the messages in lexicographic order.
490491 This helps with testing commands that are non-deterministic in their ordering.
491492
493+ Position reporting:
494+ - ` positions := true ` reports the ranges of all messages relative to the line on which
495+ ` #guard_msgs ` appears.
496+ - ` positions := false ` does not report position info.
497+
492498For example, ` #guard_msgs (error, drop all) in cmd ` means to check warnings and drop
493499everything else.
494500
@@ -623,17 +629,6 @@ Another important difference is that the `minImports` *linter* starts counting i
623629where the option is set to ` true ` * downwards* , whereas the ` #min_imports ` * command* looks at the
624630imports needed from the command * upwards* .
625631
626- ## \# import_diff
627- Defined in: ` «command#import_diff_» `
628-
629- ` #import_diff foo bar ... ` computes the new transitive imports that are added to a given file when
630- modules ` foo, bar, ... ` are added to the set of imports of the file. More precisely, it computes the
631- import diff between when ` foo, bar, ... ` are added to the imports and when ` foo, bar, ... ` are removed
632- from the imports.
633-
634- Note: the command also works when some of the modules passed as arguments are already present in the file's
635- imports.
636-
637632## \# info_trees
638633Defined in: ` Lean.infoTreesCmd `
639634
@@ -1657,8 +1652,9 @@ docs of `<declName>` by adding `<prefix_string>` before and `<suffix_string>` af
16571652## gen_injective_theorems%
16581653Defined in: ` Lean.Parser.Command.genInjectiveTheorems `
16591654
1660- This is an auxiliary command for generation constructor injectivity theorems for
1655+ This is an auxiliary command to generate constructor injectivity theorems for
16611656inductive types defined at ` Prelude.lean ` .
1657+ Temporarily also controls the generation of the ` ctorIdx ` definition.
16621658It is meant for bootstrapping purposes only.
16631659
16641660## grind_pattern
@@ -2318,7 +2314,7 @@ which helps in maintaining the desired abstraction level without affecting globa
23182314## section
23192315Defined in: ` Lean.Parser.Command.section `
23202316
2321- A ` section ` /` end ` pair delimits the scope of ` variable ` , ` include, ` open` , ` set_option` , and ` local`
2317+ A ` section ` /` end ` pair delimits the scope of ` variable ` , ` include ` , ` open ` , ` set_option ` , and ` local `
23222318commands. Sections can be nested. ` section <id> ` provides a label to the section that has to appear
23232319with the matching ` end ` . In either case, the ` end ` can be omitted, in which case the section is
23242320closed at the end of the file.
0 commit comments