Permalink
Browse files

Add shellcheck analysis in Travis

Resolves: #643
  • Loading branch information...
siteshwar committed Aug 26, 2018
1 parent c26b74a commit 47f5033da8af5e5fafadb15b0b8b2fd1a1d17d4d
Showing with 14 additions and 0 deletions.
  1. +10 −0 .travis.yml
  2. +4 −0 bin/shellcheck
View
@@ -61,13 +61,23 @@ matrix:
# This variable is not required by macOS builds, but setting it for Travis dashboard.
- DISTRO_TYPE=macOS
- os: linux
env:
- SCAN_TYPE="shellcheck"
DISTRO_TYPE=fedora
INSTALL_REQUIREMENTS="dnf repolist; dnf install -y shellcheck"
before_install:
- docker pull ${DISTRO_TYPE}
services:
- docker
script:
# Fetch tags to set version number
- git fetch --tags
- if [[ $SCAN_TYPE == "shellcheck" ]]; then exec bin/shellcheck; fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then exec scripts/build-on-macos.sh; fi
- docker run -v $TRAVIS_BUILD_DIR:/source ${DISTRO_TYPE} bash -c "set -e;
View
@@ -0,0 +1,4 @@
#!/bin/sh
# Run shellcheck on scripts under bin and scripts directories
# shellcheck disable=SC2046,SC2038
shellcheck $(find scripts/ bin/ | xargs file | grep sh | cut -d':' -f1)

0 comments on commit 47f5033

Please sign in to comment.