You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(lint-style): rewrite the 'broad imports' linters in Lean (#14059)
This time, the error codes are intentionally changed, as the old ones feel actively misleading.
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
Copy file name to clipboardExpand all lines: scripts/lint-style.py
+1-11Lines changed: 1 addition & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,6 @@
39
39
40
40
ERR_MOD=2# module docstring
41
41
ERR_LIN=3# line length
42
-
ERR_TAC=9# imported Mathlib.Tactic
43
-
ERR_TAC2=10# imported Lake in Mathlib
44
42
ERR_IBY=11# isolated by
45
43
ERR_IWH=22# isolated where
46
44
ERR_DOT=12# isolated or low focusing dot
@@ -67,11 +65,7 @@
67
65
eliferrno=="ERR_LIN":
68
66
exceptions+= [(ERR_LIN, path, None)]
69
67
eliferrno=="ERR_ADN":
70
-
pass# maintained by the Lean style linter now
71
-
eliferrno=="ERR_TAC":
72
-
exceptions+= [(ERR_TAC, path, None)]
73
-
eliferrno=="ERR_TAC2":
74
-
exceptions+= [(ERR_TAC2, path, None)]
68
+
pass# maintained by the Lean style Linter now
75
69
eliferrno=="ERR_NUM_LIN":
76
70
pass# maintained by the Lean style linter now
77
71
else:
@@ -352,10 +346,6 @@ def format_errors(errors):
352
346
output_message(path, line_nr, "ERR_MOD", "Module docstring missing, or too late")
353
347
iferrno==ERR_LIN:
354
348
output_message(path, line_nr, "ERR_LIN", "Line has more than 100 characters")
355
-
iferrno==ERR_TAC:
356
-
output_message(path, line_nr, "ERR_TAC", "Files in mathlib cannot import the whole tactic folder")
357
-
iferrno==ERR_TAC2:
358
-
output_message(path, line_nr, "ERR_TAC2", "In the past, importing 'Lake' in mathlib has led to dramatic slow-downs of the linter (see e.g. mathlib4#13779). Please consider carefully if this import is useful and make sure to benchmark it. If this is fine, feel free to allow this linter.")
359
349
iferrno==ERR_IBY:
360
350
output_message(path, line_nr, "ERR_IBY", "Line is an isolated 'by'")
0 commit comments