Add linting for shell scripts

This changes tidy to check shell scripts for the proper shebang and
options.  It does not check that variables are formatted correctly.  It
also adds a check for the MPL 2.0 license in shell scripts.
This commit is contained in:
Jim Berlage 2016-07-05 12:15:40 -05:00
parent 1e0321f7dd
commit 7952bd00b6
10 changed files with 104 additions and 13 deletions

View file

@ -1,12 +1,17 @@
#!/usr/bin/env bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Make sure listed files do not contain "unwrap"
set -o errexit
set -o nounset
set -o pipefail
cd "$(git rev-parse --show-toplevel)" # cd into repo root so make sure paths works in any case
# cd into repo root to make sure paths work in any case
cd "$(git rev-parse --show-toplevel)"
# files that should not contain "unwrap"
FILES=("components/compositing/compositor.rs"