Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply final set of Shellcheck fixes and turn on in CI #7832

Merged
merged 16 commits into from Jun 3, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Run shellcheck.py in pre-commit check.

  • Loading branch information...
Eric-Arellano committed Jun 1, 2019
commit b222ffc918c3b79231dbe5321ae3bc30115580ff
@@ -6,7 +6,7 @@
import subprocess
from glob import glob

from common import die, green
from common import die


def main() -> None:
@@ -37,8 +37,6 @@ def run_shellcheck() -> None:
subprocess.run(command, check=True)
except subprocess.CalledProcessError:
die("Please fix the above errors and run again.")
else:
green("./pants passed the shellcheck!")


if __name__ == "__main__":
@@ -35,15 +35,18 @@ ADDED_FILES=($(./build-support/bin/get_added_files.sh))
MERGE_BASE="$(git_merge_base)"

echo "* Checking packages"
./build-support/bin/check_packages.sh "${DIRS_TO_CHECK[@]}"
./build-support/bin/check_packages.sh "${DIRS_TO_CHECK[@]}" || exit 1

echo "* Checking headers"
./build-support/bin/check_header.py "${DIRS_TO_CHECK[@]}" --files-added "${ADDED_FILES[@]}"
./build-support/bin/check_header.py "${DIRS_TO_CHECK[@]}" --files-added "${ADDED_FILES[@]}" || exit 1

echo "* Checking for banned imports"
./build-support/bin/check_banned_imports.py
./build-support/bin/check_banned_imports.py || exit 1

echo "* Checking for bad shell patterns"
echo "* Checking shell scripts via shellcheck"
./build-support/bin/shellcheck.py || exit 1

echo "* Checking shell scripts via our custom linter"
./build-support/bin/check_shell.sh || exit 1

# When travis builds a tag, it does so in a shallow clone without master fetched, which
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.