code checking : added flake8
This commit is contained in:
parent
f3d62f1d3b
commit
ae7c999712
@ -10,6 +10,7 @@ sudo: false
|
|||||||
install:
|
install:
|
||||||
- "pip install coveralls"
|
- "pip install coveralls"
|
||||||
- "pip install pep8"
|
- "pip install pep8"
|
||||||
|
- "pip install flake8"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# Need this for the git tests to succeed.
|
# Need this for the git tests to succeed.
|
||||||
@ -25,6 +26,8 @@ script:
|
|||||||
# Checks if the file that have been changed are pep8 conformant
|
# Checks if the file that have been changed are pep8 conformant
|
||||||
- CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py/g'`
|
- CHANGED_PYTHON_FILES=`git diff develop... --name-only | perl -ne 'print if /\.py/g'`
|
||||||
- if [[ ${CHANGED_PYTHON_FILES} ]] ; then pep8 --max-line-length=120 ${CHANGED_PYTHON_FILES} ; fi
|
- if [[ ${CHANGED_PYTHON_FILES} ]] ; then pep8 --max-line-length=120 ${CHANGED_PYTHON_FILES} ; fi
|
||||||
|
- if [[ ${CHANGED_PYTHON_FILES} ]] ; then flake8 --format pylint --config flake8.ini ${CHANGED_PYTHON_FILES} ; fi
|
||||||
|
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
|
3
flake8.ini
Normal file
3
flake8.ini
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[flake8]
|
||||||
|
ignore = W391,F403
|
||||||
|
max-line-length = 120
|
Loading…
Reference in New Issue
Block a user