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

SE: Move CollectionConstraint from S4158 to the engine #7866

Closed
Tim-Pohlmann opened this issue Aug 23, 2023 · 0 comments · Fixed by #8749
Closed

SE: Move CollectionConstraint from S4158 to the engine #7866

Tim-Pohlmann opened this issue Aug 23, 2023 · 0 comments · Fixed by #8749
Assignees
Labels
Area: C# C# rules related issues. Area: CFG/SE CFG and SE related issues. Area: VB.NET VB.NET rules related issues.
Milestone

Comments

@Tim-Pohlmann
Copy link
Contributor

CollectionConstraint is a local constraint of S4158. We do learn NumberConstraints from list.Count if list has a CollectionConstraint. This has beneficial effects on other rules. The CollectionConstraint logic should be moved to the engine itself and the rule should only check for the constraint's presence. This will make sure, CollectionConstraints can can be learned even if S4158 is deactivated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: CFG/SE CFG and SE related issues. Area: VB.NET VB.NET rules related issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants