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 16 commits into from Jun 3, 2019
Changes from 1 commit
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

Run 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:, check=True)
except subprocess.CalledProcessError:
die("Please fix the above errors and run again.")
green("./pants passed the shellcheck!")

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

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

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

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

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

echo "* Checking shell scripts via our custom linter"
./build-support/bin/ || 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.