Survive a single-file PSUseCorrectCasing failure - #21
Merged
Merged
Conversation
The casing workaround assumed PSScriptAnalyzer's command-metadata resolution only fails during a recursive multi-file analysis, so it ran the rule per file and let any failure terminate the run. The failure also strikes single files - PSScriptAnalyzer 1.25.0 throws "Unable to cast FunctionMemberAst to FunctionDefinitionAst" on some constructs, reproducibly on one real build script - and one such file killed the entire analysis, reporting nothing for any file. No PSScriptAnalyzer fix to absorb instead: 1.25.0 is current on the gallery. - A per-file casing failure is now a warning naming the file and the underlying error; analysis continues, and the recursive pass still covers that file with every rule except casing. - The removal note on Invoke-PSModuleAnalyzer no longer claims the upstream bug is recursive-only. - New test: one file's casing crash warns, the other file's casing pass and the recursive pass still run. - ModuleVersion 4.2.1.
SummarySummary
Coveragesrc/Private - 96.1%
src/Public - 88.4%
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The casing workaround assumed PSScriptAnalyzer's command-metadata resolution only fails during a recursive multi-file analysis, so it ran the rule per file and let any failure terminate the run. The failure also strikes single files - PSScriptAnalyzer 1.25.0 throws "Unable to cast FunctionMemberAst to FunctionDefinitionAst" on some constructs, reproducibly on one real build script - and one such file killed the entire analysis, reporting nothing for any file. No PSScriptAnalyzer fix to absorb instead: 1.25.0 is current on the gallery.