PowerShell / PowerShell/PSScriptAnalyzer
Add arity check to type compatibility method checking
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
The UseCompatibleTypes rule has access to information about how many parameters and what types methods take.
Type resolution in PowerShell would be fairly difficult, but checking the number of arguments of a method is pretty easy to do.
As a stretch, the overload could be determined and checked properly in cases where an argument is statically determinable.
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
Start by locating the UseCompatibleTypes rule and its method-checking logic. Verify how method parameter counts and types are represented, then make the arity check the done condition; overload resolution for statically determinable arguments is described as a stretch goal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100