Add linter and bashate tox checks
For correct job succeed need to add tox checkers. Change-Id: Ic9e74e3461928efc2f7ffed5be17372ed5add554
This commit is contained in:
parent
b3bcbb007b
commit
94d3facf4f
68
.gitignore
vendored
Normal file
68
.gitignore
vendored
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
*.py[cod]
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
*.egg
|
||||||
|
*.egg-info
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
.eggs
|
||||||
|
eggs
|
||||||
|
parts
|
||||||
|
bin
|
||||||
|
var
|
||||||
|
sdist
|
||||||
|
develop-eggs
|
||||||
|
.installed.cfg
|
||||||
|
lib
|
||||||
|
lib64
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
.coverage
|
||||||
|
cover
|
||||||
|
.tox
|
||||||
|
nosetests.xml
|
||||||
|
.testrepository
|
||||||
|
.venv
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
|
||||||
|
# Mr Developer
|
||||||
|
.mr.developer.cfg
|
||||||
|
.project
|
||||||
|
.pydevproject
|
||||||
|
|
||||||
|
# Complexity
|
||||||
|
output/*.html
|
||||||
|
output/*/index.html
|
||||||
|
|
||||||
|
# Sphinx
|
||||||
|
doc/build
|
||||||
|
|
||||||
|
# oslo-config-generator
|
||||||
|
etc/*.sample
|
||||||
|
|
||||||
|
# pbr generates these
|
||||||
|
AUTHORS
|
||||||
|
ChangeLog
|
||||||
|
|
||||||
|
# Editors
|
||||||
|
*~
|
||||||
|
.*.swp
|
||||||
|
.*sw?
|
||||||
|
|
||||||
|
# Vagrant
|
||||||
|
.vagrant
|
||||||
|
vagrant/Vagrantfile.custom
|
||||||
|
vagrant/vagrantkey*
|
||||||
|
|
||||||
|
# generated openrc
|
||||||
|
openrc
|
||||||
|
|
||||||
|
tests/.cache*
|
6
tools/yamllint.sh
Executable file
6
tools/yamllint.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
workdir=$(dirname $0)
|
||||||
|
finder=$(find . -not -path '*/\.*' -type f -name '*.yaml')
|
||||||
|
yamllint -c $workdir/yamllint.yaml $finder
|
21
tools/yamllint.yaml
Normal file
21
tools/yamllint.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
braces:
|
||||||
|
max-spaces-inside: 1
|
||||||
|
comments:
|
||||||
|
level: error
|
||||||
|
comments-indentation:
|
||||||
|
level: warning
|
||||||
|
document-end:
|
||||||
|
present: false
|
||||||
|
document-start:
|
||||||
|
level: error
|
||||||
|
present: false
|
||||||
|
empty-lines:
|
||||||
|
max: 1
|
||||||
|
max-start: 0
|
||||||
|
max-end: 0
|
||||||
|
line-length:
|
||||||
|
level: warning
|
||||||
|
max: 120
|
17
tox.ini
Normal file
17
tox.ini
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[tox]
|
||||||
|
minversion = 1.6
|
||||||
|
envlist = linters,bashate
|
||||||
|
skipsdist = True
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
deps = yamllint
|
||||||
|
commands =
|
||||||
|
{toxinidir}/tools/yamllint.sh
|
||||||
|
|
||||||
|
[testenv:bashate]
|
||||||
|
deps = bashate>=0.2
|
||||||
|
whitelist_externals = bash
|
||||||
|
commands = bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -0 bashate -v"
|
Loading…
x
Reference in New Issue
Block a user