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

Add regex to aggregate equation operators #91

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SkylineThomasCR
Copy link
Member

Copy link

sonarcloud bot commented Sep 17, 2024

@@ -1747,7 +1747,7 @@ public List<IValidationResult> CheckTrendAlarm(XmlDocument xDoc) // M
/// <param name="xmlNsm">The namespace.</param>
private void CheckActionAttributes(XmlDocument xDoc, List<IValidationResult> resultMsg, XmlNamespaceManager xmlNsm)
{
string[] operators = { "<", ">", "==", "<=", ">=", "!=", "&lt;", "&gt;", "&lt;=", "&gt;=" };
string[] operators = { "<", ">", "==", "<=", ">=", "!=", "&lt;", "&gt;", "&lt;=", "&gt;=", "regex" };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the if on line 1960, a false positive will be thrown as regex apparently doesn't need to have an ID which the check doesn't take in account.
Same for the 'equationValue' on line 2041.

@SkylineThomasCR
Copy link
Member Author

6247f43
@MichielOda, I've added a new ValidatorResult. Which ID should it have? I used 9999 as placeholder.

@MichielOda
Copy link
Member

6247f43 @MichielOda, I've added a new ValidatorResult. Which ID should it have? I used 9999 as placeholder.

I would suggest to skip the error message. If this needs to be improved, the check needs to be converted to the new format. The intention is not to introduce new error messages in the legacy code, only fixes.

Only skip the validation if no valid regex attribute is found, otherwise give the same invalid syntax error.
@SkylineThomasCR
Copy link
Member Author

6247f43 @MichielOda, I've added a new ValidatorResult. Which ID should it have? I used 9999 as placeholder.

I would suggest to skip the error message. If this needs to be improved, the check needs to be converted to the new format. The intention is not to introduce new error messages in the legacy code, only fixes.

Removed new error message in cb5534e

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

Successfully merging this pull request may close these issues.

2 participants