Skip to content

Instantly share code, notes, and snippets.

@aofarrel
Last active February 13, 2026 21:12
Show Gist options
  • Select an option

  • Save aofarrel/7278860d6636dc8892300178c55bc9c7 to your computer and use it in GitHub Desktop.

Select an option

Save aofarrel/7278860d6636dc8892300178c55bc9c7 to your computer and use it in GitHub Desktop.
CAVEATS APPLY
YOUR_WDL_FILE=share_projects_with_team.wdl
tmpfile=$(mktemp /tmp/wdl_lint_XXXX.py)
awk '/python3 << CODE/{flag=1;next}/CODE/{flag=0}flag' "$YOUR_WDL_FILE" | sed 's/^\t\t//' | sed -E 's/~\{[^}]+\}/1/g' > "$tmpfile"
pylint --indent-string="\t" "$tmpfile"
rm /tmp/wdl_lint_XXXX.py
# ASSUMPTIONS:
# * WDL is tab indented
# * WDL command section's starting indentation is two tabs
# * Python is tab-indented (PEP-8? Never heard of her!)
# * You only use ~{the_much_cooler} syntax for WDL variables instead of ${this_nonsense} (implies WDL 1.0+)
# * All WDL variables can be replaced by int literal 1 to stop pylint from freaking out when it sees a tilde
# * No $INLINE_BASH_VARIABLES in your Python code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment