Skip to content

Fix severity filtering while invoking script analyzer #480

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
Mar 29, 2016

Conversation

kapilmb
Copy link

@kapilmb kapilmb commented Mar 29, 2016

Filters the rules based on their severity before passing them the AST for
analysis.

Prior to the fix, the severity filter was applied on diagnostic records.
This was inefficient as Invoke-ScriptAnalyzer would run all the rules
irrespective of the given severity and then filter the diagnostic records
to extract the results that corresponded to the given severity.


This change is Reviewable

Filters the rules based on their severity before passing them the AST for
analysis.

Prior to the fix, the severity filter was applied on diagnostic records.
This was inefficient as Invoke-ScriptAnalyzer would run all the rules
irrespective of the given severity and then filter the diagnostic records
to extract the results that corresponded to the given severity.
@raghushantha
Copy link
Member

Good perf optimization. thanks for the fix. :lgtm:


Comments from the review on Reviewable.io

@raghushantha
Copy link
Member

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

Rules are filtered prior to creating tasks (threads). This avoids
creating unnecessary tasks as opposed to the earlier approach where
rule invocation was decided within their corresponding tasks.
@raghushantha
Copy link
Member

:lgtm:


Comments from the review on Reviewable.io

@raghushantha
Copy link
Member

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@kapilmb kapilmb merged commit 31de911 into development Mar 29, 2016
@kapilmb kapilmb deleted the FixInvokeScriptAnalyzerSeverityFilter branch March 29, 2016 21:04
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.

3 participants