File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ ` cylc lint ` : added rule to check for ` rose date ` usage (should be replaced with ` isodatetime ` ).
Original file line number Diff line number Diff line change @@ -569,7 +569,21 @@ def check_indentation(line: str) -> bool:
569
569
'job-script-vars/index.html'
570
570
),
571
571
FUNCTION : check_for_obsolete_environment_variables ,
572
- }
572
+ },
573
+ 'U014' : {
574
+ 'short' : 'Use "isodatetime [ref]" instead of "rose date [-c]"' ,
575
+ 'rst' : (
576
+ 'For datetime operations in task scripts:\n \n '
577
+ ' * Use ``isodatetime`` instead of ``rose date``\n '
578
+ ' * Use ``isodatetime ref`` instead of ``rose date -c`` for '
579
+ 'the current cycle point\n '
580
+ ),
581
+ 'url' : (
582
+ 'https://cylc.github.io/cylc-doc/stable/html/7-to-8/'
583
+ 'cheat-sheet.html#datetime-operations'
584
+ ),
585
+ FUNCTION : re .compile (r'rose +date' ).findall ,
586
+ },
573
587
}
574
588
RULESETS = ['728' , 'style' , 'all' ]
575
589
EXTRA_TOML_VALIDATION = {
Original file line number Diff line number Diff line change 103
103
pre-script = "echo ${CYLC_SUITE_DEF_PATH}"
104
104
script = {{HELLOWORLD}}
105
105
post-script = "echo ${CYLC_SUITE_INITIAL_CYCLE_TIME}"
106
+ env-script = POINT=$(rose date 2059 --offset P1M)
106
107
[[[suite state polling]]]
107
108
template = and
108
109
[[[remote]]]
You can’t perform that action at this time.
0 commit comments