Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference to a related issue in the repository
Related to the rules PR.
Description
What is this change?
This PR adds a unit test for compliance checking if the rule syntax is correctly defined in OSI. I also updated the regex of the rules so that at the start of a rule there should be a whitespace and after the double colon there must be a numeric number.
What does it fix?
Automatic compliance checking and syntax checking for rules even before the rules are parsed from the osi-validator.
The unit test tests:
\rulesand\endrulestagsrules.ymlfileHow has it been tested?
Test 1: Add rules to message -> DETECTED
Test 2: Define wrong syntax -> DETECTED
Test 3: Add rules to enums and fields -> DETECTED
Test 4: Mess up the syntax like not defining \rules or \endrules or both -> DETECTED
Test 5: Mess up with the spacing -> DETECTED
Test 6: Add rules which does not exists -> DETECTED
Mention a member
@jdsika pls review. I will explain tomorrow how the rule checking is working.
Check the checklist