1
Fork 0

update_lints rewrite: Add structure and --print-only

This commit is contained in:
Philipp Hansch 2018-07-17 22:50:17 +02:00
parent 2b7a5304f6
commit 35f100b4f9
No known key found for this signature in database
GPG key ID: B6FA06A6E0E2665B
8 changed files with 470 additions and 13 deletions

View file

@ -7,6 +7,7 @@
import os
import re
import sys
from subprocess import call
declare_deprecated_lint_re = re.compile(r'''
declare_deprecated_lint! \s* [{(] \s*
@ -166,19 +167,7 @@ def main(print_only=False, check=False):
all_lints += value
if print_only:
print_clippy_lint_groups = [
"correctness",
"style",
"complexity",
"perf",
"pedantic",
"nursery",
"restriction"
]
for group in print_clippy_lint_groups:
sys.stdout.write('\n## ' + group + '\n')
for (_, name, _, descr) in sorted(clippy_lints[group]):
sys.stdout.write('* [' + name + '](https://rust-lang-nursery.github.io/rust-clippy/master/index.html#' + name + ') (' + descr + ')\n')
call(["./util/dev", "update_lints", "--print-only"])
return
# update the lint counter in README.md