From 1736560804c28159a79c0969a593a03c58dabfc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dobros=C5=82aw=20=C5=BBybort?= Date: Fri, 1 Sep 2017 08:43:26 +0200 Subject: [PATCH 1/3] Add linters to Travis --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index 77fee6e32..c0bfe7c0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,13 @@ services: - docker language: python +addons: + apt: + sources: + - debian-sid # Grab shellcheck from the Debian repo (o_O) + packages: + - shellcheck + env: - IGNORE_DOCKER_VERSION=true @@ -13,11 +20,20 @@ before_install: - sudo apt-get -y install docker-ce - pip install pip --upgrade - pip install git+https://github.com/timothyb89/dbuild.git + - pip install flake8 flake8-blind-except flake8-builtins flake8-pep3101 flake8-coding pylint + - flake8 --version + - pylint --version - docker --version - docker-compose --version jobs: include: + - stage: linting-flake8 + script: flake8 + - stage: linting-pylint + script: pylint + - stage: lint-shellcheck + script: bash -c 'shopt -s globstar; shellcheck **/*.{sh,bash}' - stage: metrics-pipeline script: python ci.py metrics - stage: logs-pipeline From b61ddd5b4e7fe1b92e24df28704b4375cc0c559a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dobros=C5=82aw=20=C5=BBybort?= Date: Fri, 1 Sep 2017 08:55:13 +0200 Subject: [PATCH 2/3] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c0bfe7c0c..1ee5b7fc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,12 +28,12 @@ before_install: jobs: include: + - stage: lint-shellcheck + script: bash -c 'shopt -s globstar; shellcheck **/*.{sh,bash}' - stage: linting-flake8 script: flake8 - stage: linting-pylint script: pylint - - stage: lint-shellcheck - script: bash -c 'shopt -s globstar; shellcheck **/*.{sh,bash}' - stage: metrics-pipeline script: python ci.py metrics - stage: logs-pipeline From 6bf20fe23bb90962c5c63d4f8e4d7026989380cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dobros=C5=82aw=20=C5=BBybort?= Date: Mon, 11 Sep 2017 11:04:44 +0200 Subject: [PATCH 3/3] Travis shellcheck search only for sh files We don't have files with `bash` extension. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1ee5b7fc5..034cc065d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_install: jobs: include: - stage: lint-shellcheck - script: bash -c 'shopt -s globstar; shellcheck **/*.{sh,bash}' + script: bash -c 'shopt -s globstar; shellcheck **/*.sh' - stage: linting-flake8 script: flake8 - stage: linting-pylint