PowerShell / PowerShell/PSScriptAnalyzer
Report when multiple values are returned from a function implicitly
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
Summary of the new feature
I'd like to be able to run a command such that if I implicitly return values as well as have a return statement that it is flagged.
Ex
function fun1 { mkdir (Join-Path $env:TEMP "myFolder"); return $true }
This should produce an error/warning because mkdir (New-Item) is actually returning a value though we also explicitly return $true.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by reviewing the repository's analyzer and test structure, then determine where implicit output and explicit return statements are analyzed. Done means the example is flagged for returning multiple values while existing behavior remains covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100