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
chore: increases rule.go test coverage #786
Conversation
internal/corazawaf/rule_test.go
Outdated
|
||
type dummyFlowAction struct{} | ||
|
||
func (a *dummyFlowAction) Init(_ plugintypes.RuleMetadata, data string) error { |
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.
func (a *dummyFlowAction) Init(_ plugintypes.RuleMetadata, data string) error { | |
func (a *dummyFlowAction) Init(_ plugintypes.RuleMetadata, _ string) error { |
internal/corazawaf/rule_test.go
Outdated
func (a *dummyFlowAction) Init(_ plugintypes.RuleMetadata, data string) error { | ||
return nil | ||
} | ||
func (a *dummyFlowAction) Evaluate(r plugintypes.RuleMetadata, tx plugintypes.TransactionState) { |
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.
You don´t need the receiver here (namely a
) as you aren't accesing any field.
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.
Just very small nits around parameter name and receivers as they aren't needed but overall looks great.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## v3/dev #786 +/- ##
==========================================
+ Coverage 81.78% 81.92% +0.13%
==========================================
Files 153 153
Lines 8204 8205 +1
==========================================
+ Hits 6710 6722 +12
+ Misses 1274 1266 -8
+ Partials 220 217 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
LGTM
PR meant to increase
rule.go
test coverage