Skip to content

Version 0-14-0 when using -r for rule selection and rule is not applicable for the given version, engine crashes #1487

Description

@JozefAerts

With version 0-14-0 (Windows version), I found out that when the user selects a rule using "-r", and that rule is not applicable to the given standard/version, then the engine crashes, with the message:

PS D:\CDISC_CORE_Engine\core-windows_0-14-0\core> .\core.exe validate -s sdtmig -v 3-4 -r CORE-000887 -d d:\temp
Traceback (most recent call last):
File "core.py", line 898, in
File "click\core.py", line 1157, in call
File "click\core.py", line 1078, in main
File "click\core.py", line 1688, in invoke
File "click\core.py", line 1434, in invoke
File "click\core.py", line 783, in invoke
File "click\decorators.py", line 33, in new_func
File "core.py", line 449, in validate
File "scripts\run_validation.py", line 133, in run_validation
File "scripts\script_utils.py", line 216, in get_rules
File "scripts\script_utils.py", line 364, in load_rules_from_cache
File "scripts\script_utils.py", line 282, in load_specified_rules
ValueError: The rule specified to include 'CORE-000887' is not in the standard sdtmig and version 3-4
[PYI-11428:ERROR] Failed to execute script 'core' due to unhandled exception!

CORE-000887 is only applicable to SDTMIG-3.2 ...
This also happens when there are multiple -r even when the other are applicable to the given version and standard.

I think in such a case, such a rule should simply be skipped.
A crash should however not occur.

Workaround for our application: when we allow the user to select individual rules, automatically disable the ones that are not for the current standard/version, so that he/she can never select such a rule.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

T-shirt sizing

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions