Azure / Azure/azure-powershell

Inconsistent on static analysis and design guideline

Open
#10,561 2 comments 0 reactions 0 assignees View on GitHub
Engineering
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

## Description
Our design guideline states that there should be <= 4 positional parameters
https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/design-guidelines/parameter-best-practices.md#positional-parameters-limit
but in the static analysis, we check if there's a parameter with position >=4
https://github.com/Azure/azure-powershell/blob/master/tools/StaticAnalysis/SignatureVerifier/SignatureVerifier.cs#L276

This is inconsistent, for example when a param has position=4.
Also when there are <= 4 params but the actual position number is >4.

## Conclusion
Need to update static analysis tool to actually detect if have <= 4 positional parameters.

## Cost

Contributor guide

Open the contributing guide

Research direction

Read the positional-parameter limit in documentation/development-docs/design-guidelines/parameter-best-practices.md and inspect the check near line 276 of tools/StaticAnalysis/SignatureVerifier/SignatureVerifier.cs. Verify how the static analysis handles a parameter at position 4 and cases with four or fewer parameters whose position numbers exceed 4. Done means the analysis matches the documented limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.