aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-05-15 02:33:22 -0400
committerB. Watson <urchlay@slackware.uk>2023-05-15 02:33:22 -0400
commit55c4c2d529bfe1ba3de48ccd2c10266a989992d3 (patch)
tree1ee2b988c683433ae55262f62d9367e1b05e32e3 /sbolint
parent541845177b59dcef079b89040ad00d9c03c4d6ab (diff)
downloadsbo-maintainer-tools-55c4c2d529bfe1ba3de48ccd2c10266a989992d3.tar.gz
sbolint: fine-tune python detection.
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbolint b/sbolint
index 1c1846f..dec7d46 100755
--- a/sbolint
+++ b/sbolint
@@ -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;
}
}