Skip to content
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

[CI Example Analyzer] Show line for ExampleIssues #19111

Merged
merged 7 commits into from
Aug 4, 2022

Conversation

MoChilia
Copy link
Member

@MoChilia MoChilia commented Aug 1, 2022

Description

  1. Show the location message: line for ExampleIssues.
  2. Abandon the complex code regex for extracting code.
  3. Add new rules: MissingExamplesHeading, MissingParametersHeading, BlockNotClosed, BlockTypeUnsupported, UnclearBlockType, NestedBlock

Test PR: #19112

Checklist

  • SHOULD select appropriate branch. Cmdlets from Autorest.PowerShell should go to generation branch.
  • SHOULD make the title of PR clear and informative, and in the present imperative tense.
  • SHOULD update ChangeLog.md file(s) appropriately
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense. Add changelog in description section if PR goes into generation branch.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD have approved design review for the changes in this repository (Microsoft internal only) with following situations
    • Create new module from the scratch
    • Create new resource types which are not easy to conform to Azure PowerShell Design Guidelines
    • Create new resource type which name doesn't use module name as prefix
    • Have design question before implementation
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT introduce breaking changes in Az minor release except preview version.
  • SHOULD NOT change version of module in pull request

@MoChilia MoChilia requested a review from isra-fel August 2, 2022 01:01
@isra-fel isra-fel self-assigned this Aug 2, 2022
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the toc (table of content) in documentation/Debugging-StaticAnalysis-Errors.md to include "## Trouble Shotting for Unexpected Errors in Example Issues"

documentation/Debugging-StaticAnalysis-Errors.md Outdated Show resolved Hide resolved
documentation/Debugging-StaticAnalysis-Errors.md Outdated Show resolved Hide resolved
tools/StaticAnalysis/ExampleAnalyzer/utils.ps1 Outdated Show resolved Hide resolved
tools/StaticAnalysis/ExampleAnalyzer/utils.ps1 Outdated Show resolved Hide resolved
tools/StaticAnalysis/ExampleAnalyzer/utils.ps1 Outdated Show resolved Hide resolved
tools/StaticAnalysis/ExampleAnalyzer/utils.ps1 Outdated Show resolved Hide resolved
tools/StaticAnalysis/ExampleAnalyzer/utils.ps1 Outdated Show resolved Hide resolved
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the toc (table of content) in documentation/Debugging-StaticAnalysis-Errors.md to include the troubleshooting subtitle.

@@ -491,7 +491,7 @@ function Get-ScriptAnalyzerResult {
Severity = $Severity
Extent = $analysisResult.Extent.ToString().Trim() -replace "`"","`'" -replace "`n"," " -replace "`r"," "
ProblemID = 5200
Remediation = "Unexpected Error. Please check https://github.com/Azure/azure-powershell/blob/master/documentation/Debugging-StaticAnalysis-Errors.md for more details."
Remediation = "Unexpected Error. Please check [Trouble Shotting for Unexpected Errors in Example Issues](https://github.com/Azure/azure-powershell/blob/master/documentation/Debugging-StaticAnalysis-Errors.md#Troubleshotting-Example-Issues) for more details."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we no longer have main branch, it was renamed to main. So please update the url

Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@isra-fel isra-fel merged commit 9c93673 into main Aug 4, 2022
@isra-fel isra-fel deleted the shiying/ci-example-line branch August 4, 2022 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants