From 16a55bdb12866cbaafd2b9d605014833a329be11 Mon Sep 17 00:00:00 2001 From: Tim Pillinger <26465611+wxtim@users.noreply.github.com> Date: Tue, 14 Jan 2025 13:04:48 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> --- changes.d/6551.fix.md | 2 +- cylc/flow/scripts/lint.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changes.d/6551.fix.md b/changes.d/6551.fix.md index 8db17899f0..3f2c6c0638 100644 --- a/changes.d/6551.fix.md +++ b/changes.d/6551.fix.md @@ -1 +1 @@ -Lint: Fix bug where lint warned about use of legitimate -W directive for PBS. \ No newline at end of file +Fix bug in `cylc lint` S014 where it warned about use of legitimate `-W` directive for PBS. \ No newline at end of file diff --git a/cylc/flow/scripts/lint.py b/cylc/flow/scripts/lint.py index ddefb03903..1187b9b1ae 100755 --- a/cylc/flow/scripts/lint.py +++ b/cylc/flow/scripts/lint.py @@ -192,7 +192,7 @@ def get_wallclock_directives(): if directive and directive == '-W': # LSF directive -W needs to have a particular form to # avoid matching PBS directive -W: - directives[module.name] = re.compile(r'^-W\s*=?\s*(\d+:)?\d+$') + directives[module.name] = re.compile(r'^-W\s*=?\s*(\d+:)?\d+[^/]*$') elif directive: directives[module.name] = re.compile(rf'^{directive}.*') return directives