-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1132
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,28 @@ | ||
/- # \#lint | ||
`#lint` コマンドは、リンタ(よくない書き方をされたコードを指摘してくれるツール)を実行します。 | ||
たとえば、以下は「ドキュメントコメントのない定理に対して警告するリンタ」を実行する例です。 | ||
-/ | ||
import Batteries.Tactic.Lint | ||
|
||
-- ドキュメントコメントのない定理 | ||
theorem hoge : True := by trivial | ||
|
||
-- エラーにならない | ||
/-- | ||
info: -- Found 0 errors in 1 declarations | ||
(plus 0 automatically generated ones) in the current file with 1 linters | ||
-- All linting checks passed! | ||
-/ | ||
#guard_msgs (whitespace := lax) in | ||
-- 定義にドキュメントコメントがあるか確認するリンタ | ||
-- 定理は対象外なのでスルーされる | ||
#lint only docBlame | ||
|
||
-- 技術的な理由で `#lint` の出力は省略しているが、 | ||
-- エラーになっている | ||
#guard_msgs (drop error) in | ||
-- ドキュメントコメントのない定理に対して警告するリンタを実行している | ||
#lint only docBlameThm |
This file contains 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