Merge "dib-lint: Ignore editor temp files for linting run"
This commit is contained in:
commit
cd5d08be89
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ cover/*
|
|||||||
*~
|
*~
|
||||||
.testrepository
|
.testrepository
|
||||||
*.sw?
|
*.sw?
|
||||||
|
#*#
|
||||||
*.pyc
|
*.pyc
|
||||||
.tox
|
.tox
|
||||||
*.egg
|
*.egg
|
||||||
|
16
bin/dib-lint
16
bin/dib-lint
@ -73,14 +73,15 @@ trap "rm -rf $TMPDIR" EXIT
|
|||||||
|
|
||||||
# note .py files are run through flake8 directly in tox.ini
|
# note .py files are run through flake8 directly in tox.ini
|
||||||
for i in $(find $ELEMENTS_DIR -type f \
|
for i in $(find $ELEMENTS_DIR -type f \
|
||||||
-not -name \*~ \
|
|
||||||
-not -name \#\*\# \
|
|
||||||
-not -name \*.orig \
|
|
||||||
-not -name \*.rst \
|
-not -name \*.rst \
|
||||||
-not -name \*.yaml \
|
-not -name \*.yaml \
|
||||||
-not -name \*.py \
|
-not -name \*.py); do
|
||||||
-not -name \*.pyc); do
|
|
||||||
|
|
||||||
|
# Skip files in .gitignore
|
||||||
|
if git check-ignore -q "$i" ; then
|
||||||
|
echo Skipping $i
|
||||||
|
continue
|
||||||
|
fi
|
||||||
echo "Checking $i"
|
echo "Checking $i"
|
||||||
|
|
||||||
exclusions=("$(parse_exclusions $i)")
|
exclusions=("$(parse_exclusions $i)")
|
||||||
@ -232,6 +233,11 @@ echo "Checking indents..."
|
|||||||
|
|
||||||
for i in $(find $ELEMENTS_DIR -type f -and -name '*.rst' -or -type f -executable) \
|
for i in $(find $ELEMENTS_DIR -type f -and -name '*.rst' -or -type f -executable) \
|
||||||
$(find $LIB_DIR -type f); do
|
$(find $LIB_DIR -type f); do
|
||||||
|
# Skip files in .gitignore
|
||||||
|
if git check-ignore -q "$i" ; then
|
||||||
|
echo Skipping $i
|
||||||
|
continue
|
||||||
|
fi
|
||||||
# Check for tab indentation
|
# Check for tab indentation
|
||||||
if ! excluded tabindent; then
|
if ! excluded tabindent; then
|
||||||
if grep -q $'^ *\t' ${i}; then
|
if grep -q $'^ *\t' ${i}; then
|
||||||
|
Loading…
Reference in New Issue
Block a user