Browse Source

Merge "Add tox fast8 option"

Jenkins 3 years ago
parent
commit
c2a76dc2ac
2 changed files with 19 additions and 0 deletions
  1. 15
    0
      tools/fast8.sh
  2. 4
    0
      tox.ini

+ 15
- 0
tools/fast8.sh View File

@@ -0,0 +1,15 @@
1
+#!/bin/bash
2
+
3
+cd $(dirname "$0")/..
4
+CHANGED=$(git diff --name-only HEAD~1 | tr '\n' ' ')
5
+
6
+# Skip files that don't exist
7
+# (have been git rm'd)
8
+CHECK=""
9
+for FILE in $CHANGED; do
10
+    if [ -f "$FILE" ]; then
11
+        CHECK="$CHECK $FILE"
12
+    fi
13
+done
14
+
15
+diff -u --from-file /dev/null $CHECK | flake8 --diff

+ 4
- 0
tox.ini View File

@@ -56,6 +56,10 @@ commands = python setup.py build_sphinx
56 56
 [testenv:cover]
57 57
 commands = {toxinidir}/tools/cover.sh {posargs}
58 58
 
59
+[testenv:fast8]
60
+commands =
61
+  {toxinidir}/tools/fast8.sh
62
+
59 63
 [testenv:pylint]
60 64
 deps = -r{toxinidir}/requirements.txt
61 65
        pylint==0.26.0

Loading…
Cancel
Save