about summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorPhilipp Hansch <dev@phansch.net>2018-07-17 22:50:17 +0200
committerPhilipp Hansch <dev@phansch.net>2018-09-03 22:18:51 +0200
commit35f100b4f9a055a98973f2a2ac2e1eb5c5cfacff (patch)
tree35586d5175d1af3ffe1b93717fad415a42c0b4d2 /util
parent2b7a5304f6b54b52b307b90d3401d691ed27b956 (diff)
update_lints rewrite: Add structure and --print-only
Diffstat (limited to 'util')
-rwxr-xr-xutil/dev3
-rwxr-xr-xutil/update_lints.py15
2 files changed, 5 insertions, 13 deletions
diff --git a/util/dev b/util/dev
new file mode 100755
index 00000000000..4fa6e69b752
--- /dev/null
+++ b/util/dev
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+cd clippy_dev && cargo run -- $@
diff --git a/util/update_lints.py b/util/update_lints.py
index ea7b992abb7..15242abd606 100755
--- a/util/update_lints.py
+++ b/util/update_lints.py
@@ -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