Skip to content

Explicitly declare insert columns #63

Explicitly declare insert columns

Explicitly declare insert columns #63

Workflow file for this run

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