Skip to content

dev: factorize base rule parsing #5360

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

Merged
merged 2 commits into from
Jan 30, 2025
Merged

dev: factorize base rule parsing #5360

merged 2 commits into from
Jan 30, 2025

Conversation

ldez
Copy link
Member

@ldez ldez commented Jan 30, 2025

ExclusionRules and Severity processors use the same structure baseRule.

The construction of this structure can be factorized to ease the maintenance.

Note: The usage of regexp.MustCompile() is safe in this context because the regular expressions are checked during the validation of the configuration.

@ldez ldez added topic: cleanup Related to code, process, or doc cleanup area: processors labels Jan 30, 2025
@ldez ldez added this to the next milestone Jan 30, 2025
@ldez ldez merged commit 15a92de into golangci:master Jan 30, 2025
18 checks passed
@ldez ldez deleted the feat/base-rule branch January 30, 2025 22:31
@ldez ldez modified the milestones: next, v1.64 Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: processors topic: cleanup Related to code, process, or doc cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants