From 81e0a3d52569d6616c70ac49f27ced3c849dfa24 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sat, 4 Mar 2017 13:20:16 -0500 Subject: [PATCH] Use coala got run ShellCheck Change-Id: I7ea7346fb2cacb5310293a3b2dbdc1e6261dbab0 Signed-off-by: Thanh Ha --- .coafile | 4 ++++ requirements.txt | 1 - run_shellcheck | 8 -------- tox.ini | 16 ++++++++++++---- 4 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 .coafile delete mode 100755 run_shellcheck diff --git a/.coafile b/.coafile new file mode 100644 index 00000000..63256b14 --- /dev/null +++ b/.coafile @@ -0,0 +1,4 @@ +[ShellCheck] +bears = ShellCheckBear +files = shell/* +shell = bash diff --git a/requirements.txt b/requirements.txt index b05dd8a2..76616bd8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ sphinx>=1.4.9 sphinx_bootstrap_theme>=0.4.14 - diff --git a/run_shellcheck b/run_shellcheck deleted file mode 100755 index c134a94a..00000000 --- a/run_shellcheck +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -command -v shellcheck >/dev/null 2>&1 || { - echo >&2 "ShellCheck is not installed. Please install using your favourite package manager." - exit 1 -} - -shellcheck shell/* diff --git a/tox.ini b/tox.ini index 5f18c0d2..18e4aa92 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,17 @@ [tox] minversion = 1.6 -envlist = docs,docs-linkcheck,shellcheck +envlist = + coala, + docs, + docs-linkcheck + +[testenv:coala] +basepython = python3 +deps = + coala + coala-bears +commands = + coala --non-interactive [testenv:docs] deps = -rrequirements.txt @@ -12,6 +23,3 @@ whitelist_externals = echo [testenv:docs-linkcheck] deps = -rrequirements.txt commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck - -[testenv:shellcheck] -commands = ./run_shellcheck -- 2.16.6