Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Validator does not report on ruleset warning 1.8.13 #549

Open
simon-20 opened this issue Mar 8, 2024 · 0 comments
Open

The Validator does not report on ruleset warning 1.8.13 #549

simon-20 opened this issue Mar 8, 2024 · 0 comments

Comments

@simon-20
Copy link
Contributor

simon-20 commented Mar 8, 2024

Brief Description
The Validator does not seem to report on ruleset warning 1.8.13 violations in any circumstances.

Ruleset website: https://iatistandard.org/en/iati-standard/203/rulesets/standard-ruleset/
1.8.13 ruleset JSON: https://github.com/IATI/IATI-Rulesets/blob/version-2.03/rulesets/standard.json#L1270

The problem seems to be that in rulesValidator.js, testRule(), there are some "idCondition" rules which are handled differently to other rules. The result is that rule violations for this condition is returned from testRule() using the rule name found in the JSON, which uses snake case, and not the mapped rule name which uses camel case. This means that, although the Validator checks for and detects violations of 1.8.13, they don't seem to ever be included in the output JSON because code which produces the output (standardiseResultFormat) is looking for the rule by camel case, but it has been returned as snake case.

I have generated a test file which violates this rule, and when testing this using the Validator, no warning is issued. (Attached)
iati-act-error-1.8.13.xml.txt

But more investigation is needed to confirm it is a problem, and scope of the problem. Other rules may be affected. I noticed this just by chance as I was debugging code to identify why the Validator was so slow.

Severity
Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant