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

Invoke-ScriptAnalyzer: Print summary only once per invocation #2063

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

MatejKafka
Copy link
Contributor

PR Summary

Similarly to the previous -EnableExit PR, this PR moves the summary printed when -ReportSummary is passed to EndProcessing, so that it's only printed once, instead of once for every value from the pipeline.

Imo, users are likely to be interested in the summary from all of the piped files, not for each file separately. Since the message is printed to the host (so the caller has no easy way to capture it), I don't believe moving it to be a breaking change.

PR Checklist

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good refactor to me, thanks! Gotta love dictionaries.

@MatejKafka MatejKafka force-pushed the single-summary-pipeline branch from cc57fa5 to 55d50d0 Compare February 26, 2025 23:55
@andyleejordan andyleejordan merged commit bcec9f6 into PowerShell:main Feb 28, 2025
4 checks passed
@MatejKafka MatejKafka deleted the single-summary-pipeline branch March 1, 2025 00:59
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.

2 participants