diff --git a/.ci/test.sh b/.ci/test.sh index df7a8e6cde5..43db2dbf154 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -50,10 +50,12 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then exit 0 fi -if [[ $TASK == "pylint" ]]; then +if [[ $TASK == "lint" ]]; then conda install -q -y -n $CONDA_ENV pycodestyle pydocstyle + pip install --user cpplint pycodestyle --ignore=E501,W503 --exclude=./compute,./.nuget . || exit -1 pydocstyle --convention=numpy --add-ignore=D105 --match-dir="^(?!^compute|test|example).*" --match="(?!^test_|setup).*\.py" . || exit -1 + cpplint --filter=-build/header_guard,-whitespace/line_length --recursive ./src ./include || exit 0 exit 0 fi diff --git a/.travis.yml b/.travis.yml index 12dcf447417..7bef9a1e7f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ env: - TASK=sdist PYTHON_VERSION=2.7 - TASK=bdist - TASK=if-else - - TASK=pylint + - TASK=lint - TASK=check-docs - TASK=mpi METHOD=source - TASK=mpi METHOD=pip @@ -31,7 +31,7 @@ matrix: - os: osx env: TASK=gpu METHOD=pip PYTHON_VERSION=3.6 - os: osx - env: TASK=pylint + env: TASK=lint - os: osx env: TASK=check-docs