-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix #151 #155
Fix #151 #155
Conversation
Codecov Report
@@ Coverage Diff @@
## master #155 +/- ##
=======================================
Coverage 49.21% 49.21%
=======================================
Files 12 12
Lines 1024 1024
=======================================
Hits 504 504
Misses 461 461
Partials 59 59 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, thank you @joselsegura
content/content.go
Outdated
@@ -121,6 +122,7 @@ func (s *RulesWithContentStorage) GetRuleIDs() []string { | |||
ruleIDs = append(ruleIDs, ruleContent.Plugin.PythonModule) | |||
} | |||
|
|||
sort.Strings(ruleIDs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to sort when comparing in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think about it and you are right. I just modified it
Description
The problem is caused because the list returned by the
rule_ids
endpoint is generated from amap
, so its order is not granted.This fix orders the output using
sort
, making the result predictableFixes #151
Type of change
Testing steps
Regular CI