Documentation

Mathlib.Tactic.Linter.MinImports

The minImports linter #

The minImports linter incrementally computes the minimal imports needed for each file to build. Whenever it detects that a new command requires an increase in the (transitive) imports that it computed so far, it emits a warning mentioning the bigger minimal imports.

Unlike the related #min_imports command, the linter takes into account notation and tactic information. It also works incrementally, accumulating increasing import information. This is better suited, for instance, to split files.

The "minImports" linter #

The "minImports" linter tracks information about minimal imports over several commands.

#reset_min_imports sets to empty the current list of cumulative imports.

Equations
Instances For

    The minImports linter incrementally computes the minimal imports needed for each file to build. Whenever it detects that a new command requires an increase in the (transitive) imports that it computed so far, it emits a warning mentioning the bigger minimal imports.

    Unlike the related #min_imports command, the linter takes into account notation and tactic information. It also works incrementally, providing information that is better suited, for instance, to split files.

    Another important difference is that the minImports linter starts counting imports from where the option is set to true downwards, whereas the #min_imports command looks at the imports needed from the command upwards.

    The linter.minImports.increases regulates whether the minImports linter reports the change in number of imports, when it reports import changes. Setting this option to false helps with test stability.

    The minImports linter incrementally computes the minimal imports needed for each file to build. Whenever it detects that a new command requires an increase in the (transitive) imports that it computed so far, it emits a warning mentioning the bigger minimal imports.

    Unlike the related #min_imports command, the linter takes into account notation and tactic information. It also works incrementally, providing information that is better suited, for instance, to split files.

    Another important difference is that the minImports linter starts counting imports from where the option is set to true downwards, whereas the #min_imports command looks at the imports needed from the command upwards.

    Equations
    Instances For