From 0dcb361e7cca5ebd16f338326af22887d5457784 Mon Sep 17 00:00:00 2001 From: Artur Zarzycki Date: Wed, 6 Jul 2016 16:41:27 +0200 Subject: [PATCH] Fix to pass linters tests Change-Id: I711def7324b37d5fa2fb34c7bab7ac034150afcc --- .gitreview | 4 ++-- tools/run-check-docker-syntax.sh | 10 ---------- tools/run-check-yaml-syntax.sh | 7 +++++++ tox.ini | 13 +++---------- 4 files changed, 12 insertions(+), 22 deletions(-) delete mode 100755 tools/run-check-docker-syntax.sh create mode 100755 tools/run-check-yaml-syntax.sh diff --git a/.gitreview b/.gitreview index efa0920..b0a6140 100644 --- a/.gitreview +++ b/.gitreview @@ -1,4 +1,4 @@ [gerrit] -host=review.fuel-infra.org +host=review.openstack.org port=29418 -project=nextgen/ms-mariadb.git +project=openstack/fuel-ccp-mariadb.git diff --git a/tools/run-check-docker-syntax.sh b/tools/run-check-docker-syntax.sh deleted file mode 100755 index 82d609e..0000000 --- a/tools/run-check-docker-syntax.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -### Temp docker syntax checker script. Doesnt really check something... -set -e -for file in $(find . -name 'Dockerfile.j2') -do - fgrep -q FROM $file - fgrep -q MAINTAINER $file - fgrep -q RUN $file -done diff --git a/tools/run-check-yaml-syntax.sh b/tools/run-check-yaml-syntax.sh new file mode 100755 index 0000000..e393c54 --- /dev/null +++ b/tools/run-check-yaml-syntax.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +### Temp yaml syntax checker script. +set -e +for file in $(find . -name '*.yaml'); do + yamllint -d relaxed $file +done diff --git a/tox.ini b/tox.ini index 5fd89c9..6b85b15 100644 --- a/tox.ini +++ b/tox.ini @@ -1,19 +1,12 @@ [tox] minversion = 1.6 -envlist = py34,py27,pypy,pep8 +envlist = linters,py27 skipsdist = True [testenv:linters] +deps = yamllint commands = - {toxinidir}/tools/run-check-docker-syntax.sh - -[testenv:pep8] -commands = - {toxinidir}/tools/run-check-docker-syntax.sh - -[testenv:bashate] -commands = - {toxinidir}/tools/run-check-docker-syntax.sh + {toxinidir}/tools/run-check-yaml-syntax.sh [testenv:py27] deps =