diff options
author | B. Watson <urchlay@slackware.uk> | 2023-05-15 02:33:22 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-05-15 02:33:22 -0400 |
commit | 55c4c2d529bfe1ba3de48ccd2c10266a989992d3 (patch) | |
tree | 1ee2b988c683433ae55262f62d9367e1b05e32e3 | |
parent | 541845177b59dcef079b89040ad00d9c03c4d6ab (diff) | |
download | sbo-maintainer-tools-55c4c2d529bfe1ba3de48ccd2c10266a989992d3.tar.gz |
sbolint: fine-tune python detection.
-rwxr-xr-x | sbolint | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1337,15 +1337,16 @@ sub check_script { $old_flags = $lineno; } - if(/^[^#]*\bpython\b/) { + if(/^\s*python\s/) { log_note("$file:$lineno: suggest replacing 'python' with 'python2' for future-proofing"); + $have_py2 = $lineno; } - if(/^[^#]*\bpython2?\b/) { + if(/^\s*python2\s/) { $have_py2 = $lineno; } - if(/^[^#]*\bpython3\b/) { + if(/^\s*python3\s/) { $have_py3 = $lineno; } } |