Browse Source

Fix to pass linters tests

Change-Id: I789ac5e8792097790d95b179919e6435439e852f
Artur Zarzycki 2 years ago
parent
commit
43bbf2b9dc
4 changed files with 15 additions and 21 deletions
  1. 2
    2
      .gitreview
  2. 0
    10
      tools/run-check-docker-syntax.sh
  3. 7
    0
      tools/run-check-yaml-syntax.sh
  4. 6
    9
      tox.ini

+ 2
- 2
.gitreview View File

@@ -1,4 +1,4 @@
1 1
 [gerrit]
2
-host=review.fuel-infra.org
2
+host=review.openstack.org
3 3
 port=29418
4
-project=nextgen/ms-rabbitmq.git
4
+project=openstack/fuel-ccp-rabbitmq.git

+ 0
- 10
tools/run-check-docker-syntax.sh View File

@@ -1,10 +0,0 @@
1
-#!/bin/bash
2
-
3
-### Temp docker syntax checker script. Doesnt really check something...
4
-set -e
5
-for file in $(find . -name 'Dockerfile.j2')
6
-do
7
-    fgrep -q FROM $file
8
-    fgrep -q MAINTAINER $file
9
-    fgrep -q RUN $file
10
-done

+ 7
- 0
tools/run-check-yaml-syntax.sh View File

@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+
3
+### Temp yaml syntax checker script.
4
+set -e
5
+for file in $(find . -name '*.yaml'); do
6
+    yamllint -d relaxed $file
7
+done

+ 6
- 9
tox.ini View File

@@ -1,17 +1,14 @@
1 1
 [tox]
2 2
 minversion = 1.6
3
-envlist = py34,py27,pypy,pep8
3
+envlist = linters,bashate
4 4
 skipsdist = True
5 5
 
6 6
 [testenv:linters]
7
+deps = yamllint
7 8
 commands =
8
-    {toxinidir}/tools/run-check-docker-syntax.sh
9
-
10
-[testenv:pep8]
11
-commands =
12
-    {toxinidir}/tools/run-check-docker-syntax.sh
9
+    {toxinidir}/tools/run-check-yaml-syntax.sh
13 10
 
14 11
 [testenv:bashate]
15
-commands =
16
-    {toxinidir}/tools/run-check-docker-syntax.sh
17
-
12
+deps = bashate>=0.2
13
+whitelist_externals = bash
14
+commands = bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -0 bashate -v"

Loading…
Cancel
Save