Repository navigation
feat(Tactic/Linter/Header): suggest formatting imports according to the style convention #44507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thorimur
wants to merge
17
commits into
leanprover-community:master
Choose a base branch
from
thorimur:format-imports-header
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+114
−43
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a7a63b1
feat: lint import formatting
thorimur 134e7ce
chore: set_option
thorimur b5a44f3
chore: test turning off
thorimur 760f904
chore: keep Metahlib.Tactic.Common ordering
thorimur 60af689
chore: fix unformatted imports that crept in
thorimur 061d41c
chore: restrict to mathlib for now?
thorimur c3b8c57
chore: test files
thorimur d695f4b
Merge remote-tracking branch 'upstream/master' into format-imports-he…
thorimur d290f6b
chore: update drifting files
thorimur 7e6bfc6
Merge remote-tracking branch 'upstream/master' into format-imports-he…
thorimur 042e06f
chore: update drift
thorimur 641471e
Merge remote-tracking branch 'upstream/master' into format-imports-he…
thorimur 38d25e4
Merge remote-tracking branch 'upstream/master' into format-imports-he…
thorimur c67bd00
chore: update drifting files
thorimur 7a0ebcb
Merge remote-tracking branch 'upstream/master' into format-imports-he…
thorimur 50dbccb
Merge remote-tracking branch 'upstream/master' into format-imports-he…
thorimur f70a744
chore: improve comment
thorimur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /- | ||
| Copyright (c) 2026 Thomas R. Murrills. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Thomas R. Murrills | ||
| -/ | ||
| module | ||
|
|
||
| import Mathlib.Init | ||
| meta import Mathlib.Init | ||
|
|
||
|
|
||
| public meta import Mathlib.Init | ||
|
|
||
| public import Mathlib.Init | ||
| import Lean.Elab.Command | ||
|
|
||
| /-- | ||
| warning: Imports can be reformatted: | ||
| i̵m̵p̵o̵r̵t̵ ̵M̵a̵t̵h̵l̵i̵b̵.̵I̵n̵i̵t̵p̲u̲b̲l̲i̲c̲ meta import Mathlib.Init | ||
| public i̲m̲p̲o̲r̲t̲ ̲M̲a̲t̲h̲l̲i̲b̲.̲I̲n̲i̲t̲ | ||
| ̲ | ||
| ̲meta ̵ ̵import Mathlib.Init | ||
| p̵u̵b̵l̵i̵c̵ ̵import M̵a̵t̵h̵l̵i̵b̵.̵I̵n̵i̵t̵ | ||
| ̵i̵m̵p̵o̵r̵t̵ ̵Lean.Elab.Command | ||
| ̲i̲m̲p̲o̲r̲t̲ ̲M̲a̲t̲h̲l̲i̲b̲.̲I̲n̲i̲t̲ | ||
|
|
||
| Note: This linter can be disabled by writing `set_option linter.style.header.imports false` just after the import block. | ||
| -/ | ||
| #guard_msgs in | ||
| set_option linter.style.header true in | ||
| /-! -/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /- | ||
| Copyright (c) 2026 Thomas R. Murrills. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Thomas R. Murrills | ||
| -/ | ||
| module | ||
|
|
||
| import Mathlib.Init | ||
| meta import Mathlib.Init | ||
|
|
||
|
|
||
| public meta import Mathlib.Init | ||
|
|
||
| public import Mathlib.Init | ||
| import Lean.Elab.Command | ||
|
|
||
| set_option linter.style.header.imports false | ||
|
|
||
| #guard_msgs in | ||
| set_option linter.style.header true in | ||
| /-! -/ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.