Last active
February 13, 2026 21:12
-
-
Save aofarrel/7278860d6636dc8892300178c55bc9c7 to your computer and use it in GitHub Desktop.
CAVEATS APPLY
This file contains hidden or 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
| 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