-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[CI Example Analyzer] Fix some bugs #18871
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
Conversation
tools/StaticAnalysis/ExampleAnalyzer/AnalyzeRules/ParameterNameAndValue.psm1
Outdated
Show resolved
Hide resolved
| $indexOfParameters = $fileContent.IndexOf($PARAMETERS_HEADING) | ||
|
|
||
| $exampleNumber = 0 | ||
| $exampleNumber = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you change the initial value as -1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$examplesTitles[$exampleNumber] needs to start at index 0 and examples matching (autogenerated) or <!-- Skip.*--> needs $exampleNumber++, or the number of the titles will be confusing.
| @@ -0,0 +1,8 @@ | |||
| "Module","Cmdlet","Example","RuleName","ProblemID","Severity","Description","Extent","Remediation" | |||
| "Accounts","Disconnect-AzAccount","2","Unbinded_Expression","5014","2","Get-AzContext 'Work' is not explicitly assigned to a parameter.","'Work'","Assign 'Work' explicitly to the parameter." | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this file needs to be checked in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the file for suppressing. We discussed to add these items in exception csv instead of adding them in the source code.
Co-authored-by: Beisi Zhou <[email protected]>
tools/StaticAnalysis/ExampleAnalyzer/AnalyzeRules/ParameterNameAndValue.psm1
Outdated
Show resolved
Hide resolved
|
Looks good to me. Any thoughts? @isra-fel |
Description
$bytes = [System.Text.Encoding]::Unicode.GetBytes($text)$VMName = 'v'+ $ResourceGroupName[System.DayOfWeek[]]$WeekDays = @([System.DayOfWeek]::Monday..[System.DayOfWeek]::Friday)TestPR: #18872
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added