Datasets:
Download lean_project/FormalConjecturesTest/Util/Linters/ImportLinter.lean from nielsr/formal-conjectures: direct link, hf CLI and curl.
- Browser
- Download file 6.32 kB
-
https://huggingface.co/datasets/nielsr/formal-conjectures/resolve/main/lean_project/FormalConjecturesTest/Util/Linters/ImportLinter.lean
- Command line
-
hf download hf://datasets/nielsr/formal-conjectures/lean_project/FormalConjecturesTest/Util/Linters/ImportLinter.lean
-
curl -L -o ImportLinter.lean https://huggingface.co/datasets/nielsr/formal-conjectures/resolve/main/lean_project/FormalConjecturesTest/Util/Linters/ImportLinter.lean
6.32 kB
| /- | |
| Copyright 2026 The Formal Conjectures Authors. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| https://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| -/ | |
| module | |
| public meta import FormalConjecturesUtil.Linters.ImportLinter | |
| @[expose] public section | |
| open ImportLinter | |
| set_option linter.style.imports true | |
| -- Standard valid import | |
| -- Files must be modules | |
| /-- | |
| warning: Files in 'FormalConjectures' must be modules. Add 'module' before the imports, use 'public import FormalConjecturesUtil', and add '@[expose] public section' after the module docstring. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| -- In a module, a plain `import` is private | |
| /-- | |
| warning: Use 'public import FormalConjecturesUtil'. In a module, a plain 'import' is private, so the statements of public declarations cannot use it. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: Direct imports from 'Mathlib' (such as 'Mathlib.Data.Nat.Prime.Nth') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: Direct imports from 'Mathlib' (such as 'Mathlib') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: Direct imports from 'Mathlib' (such as 'Mathlib.Topology.Basic') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| --- | |
| warning: Files in 'FormalConjectures' must import 'FormalConjecturesUtil'. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: Files in 'FormalConjectures' must import 'FormalConjecturesUtil'. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: Direct imports from 'FormalConjecturesForMathlib' (such as 'FormalConjecturesForMathlib.Combinatorics.Basic') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: Direct imports from 'FormalConjecturesForMathlib' (such as 'FormalConjecturesForMathlib') are disallowed in 'FormalConjectures'. Use 'import FormalConjecturesUtil' instead. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| -- When disabled via set_option, no warnings are emitted | |
| set_option linter.style.imports false in | |
| set_option linter.style.imports false in | |
| -- `meta import`s only load compiled code and are exempt from the direct-import rules | |
| -- `meta import`ing a whole library is disallowed | |
| /-- | |
| warning: 'meta import FormalConjecturesUtil' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide'). | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: 'meta import FormalConjecturesForMathlib' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide'). | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| /-- | |
| warning: 'meta import Mathlib' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide'). | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |
| -- a `meta import` of `FormalConjecturesUtil` also does not count as importing it | |
| /-- | |
| warning: 'meta import FormalConjecturesUtil' loads the compiled code of the whole library. Instead, 'meta import' only the module defining the declaration that is evaluated (for example by 'native_decide'). | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| --- | |
| warning: Files in 'FormalConjectures' must import 'FormalConjecturesUtil'. | |
| Note: This linter can be disabled with `set_option linter.style.imports false` | |
| -/ | |