From 55c4c2d529bfe1ba3de48ccd2c10266a989992d3 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 15 May 2023 02:33:22 -0400 Subject: sbolint: fine-tune python detection. --- sbolint | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sbolint') 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; } } -- cgit v1.2.3