Explicitly declare insert columns #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint-check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
import_syntax_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check import syntax | |
run: | | |
EXITCODE=0 | |
for file in $(find . -name '*.wdl'); do | |
>&2 echo "Checking file $file..." | |
import_lines=$(awk '/import/' "$file") | |
bad_lines=$(echo "$import_lines" | awk '/https:\/\/raw.githubusercontent.com\/stjude\/XenoCP/') || true | |
if [ -n "$bad_lines" ]; then | |
>&2 echo "Imports from this repo must use relative paths!" | |
>&2 echo "The following lines are bad:" | |
>&2 echo "$bad_lines" | |
>&2 echo "" | |
EXITCODE=1 | |
fi | |
bad_lines=$(echo "$import_lines" | awk '/http/ && (/main/ || /master/)') || true | |
if [ -n "$bad_lines" ]; then | |
>&2 echo "Imports from external repos must use a tagged release!" | |
>&2 echo "The following lines are bad:" | |
>&2 echo "$bad_lines" | |
>&2 echo "" | |
EXITCODE=1 | |
fi | |
done | |
exit $EXITCODE |