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

Add analyzerrule for highlighting slow *-object commands #1753

Merged
merged 1 commit into from Jun 14, 2021

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented Oct 31, 2020

PR Summary

New PSSA analyzer-rule to highlight usage of most *-Object built-in cmdlets as they can be slower than other alternatives.
Currently Information-level.

Based on #1745 (comment)

PR Checklist

  • PR has meaningful title
  • Summary describes changes
  • PR is ready to be merged
    • If not, use the arrow next to Create Pull Request to mark it as a draft. PR can be marked Ready for review when it's ready.
  • Tests are added/update (if required)
  • Documentation is updated/added (if required)

@fflaten fflaten changed the title Add analyzerrule for highlighting possibly slow *-object commands Add analyzerrule for highlighting slow *-object commands Oct 31, 2020
@fflaten fflaten marked this pull request as ready for review June 13, 2021 16:03
@fflaten
Copy link
Collaborator Author

fflaten commented Jun 13, 2021

I don't see a reason not to merge this. Not sure how useful the rule will be (ex. New-Object seems fast in 5.1), but since it's Information-level it will be ignored by the default settings in PSScriptAnalyzer.psd1 so it shouldn't create noise unless severity is overridden to include Information. 👍

@nohwnd nohwnd merged commit 23f9492 into pester:main Jun 14, 2021
@fflaten fflaten deleted the buildrule-objectcmdlets branch June 14, 2021 09:45
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.

None yet

2 participants