reactor: Removal of double spaces
This commit is contained in:
parent
ce92e1d649
commit
13f62a50eb
64 changed files with 550 additions and 546 deletions
|
@ -7,14 +7,16 @@ Taken from Mathlib's linters. These perform text-based linting of the code.
|
|||
|
||||
These are to be slowly replaced with code written in Lean.
|
||||
|
||||
## double_line_lint
|
||||
## hepLean_style_lint
|
||||
|
||||
Checks for double empty lines in HepLean.
|
||||
Checks the following in HepLean
|
||||
- There are no double empty lines.
|
||||
- There are no non-initial double spaces.
|
||||
Passing this linter is currently not required to pass CI on github.
|
||||
|
||||
Run using
|
||||
```
|
||||
lake exe double_line_lint
|
||||
lake exe hepLean_style_lint
|
||||
```
|
||||
|
||||
## check_file_imports.lean
|
||||
|
|
|
@ -7,9 +7,11 @@ import Lean
|
|||
import Mathlib.Tactic.Linter.TextBased
|
||||
/-!
|
||||
|
||||
# Double line Lint
|
||||
# HepLean style linter
|
||||
|
||||
This linter double empty lines in files.
|
||||
A number of linters on HepLean to enforce a consistent style.
|
||||
|
||||
There are currently not enforced at the GitHub action level.
|
||||
|
||||
## Note
|
||||
|
||||
|
@ -31,7 +33,7 @@ def doubleEmptyLineLinter : HepLeanTextLinter := fun lines ↦ Id.run do
|
|||
else none)
|
||||
errors.toArray
|
||||
|
||||
/-- Checks if there is a souble space in the line, which is not at the start. -/
|
||||
/-- Checks if there is a double space in the line, which is not at the start. -/
|
||||
def doubleSpaceLinter : HepLeanTextLinter := fun lines ↦ Id.run do
|
||||
let enumLines := (lines.toList.enumFrom 1)
|
||||
let errors := enumLines.filterMap (fun (lno, l) ↦
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue