Skip to content

Commit 0b6950f

Browse files
committed
Resolve review feedback and fix on-demand failure
1 parent 7f01e55 commit 0b6950f

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

documentation/Debugging-StaticAnalysis-Errors.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ d:\workspace\powershell\build.proj(511,5): error MSB3073: The command "d:\worksp
1818
## Where to find StaticAnalysis reports
1919

2020
The StaticAnalysis reports could show up in two different places in the CI build:
21-
- On the status page in Jenkins, under the Build Artifacts: the relevant files are BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv.
22-
- On the status page in Jenkins, click Build Artifacts then navigate to src/Package. You will see BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv.
21+
- On the status page in Jenkins, under the Build Artifacts: the relevant files are `BreakingChangeIssues.csv`, `SignatureIssues.csv`, and/or `HelpIssues.csv`.
22+
- On the status page in Jenkins, click Build Artifacts then navigate to src/Package. You will see `BreakingChangeIssues.csv`, `SignatureIssues.csv`, and/or `HelpIssues.csv`.
2323

24-
Locally, the StaticAnalysis report will show up under Azure-PowerShell/src/Package. You will see BreakingChangeIssues.csv, SignatureIssues.csv, and/or HelpIssues.csv. You can generate these files by running
24+
Locally, the StaticAnalysis report will show up under Azure-PowerShell/src/Package. You will see `BreakingChangeIssues.csv`, `SignatureIssues.csv`, and/or `HelpIssues.csv`. You can generate these files by running
2525
```
2626
msbuild build.proj
2727
```
@@ -30,18 +30,25 @@ msbuild build.proj
3030
The three most common Static Analysis errors are breaking changes, signature issues, and help issues. To figure out which type of error is causing the build failure, open each of the relevant .csv files (if the .csv file does not exist, there is no violation detected). Any issue marked with severity 0 or 1 must be resolved in order for the build to pass.
3131

3232
### Breaking Changes
33-
If you make a change that could cause a breaking change, it will be listed in BreakingChangeIssues.csv. Please look at each of these errors, and if they do indeed introduce a breaking change in a non-breaking change release, please revert the change that caused this violation. Sometimes the error listed in the .csv file can be a false positive (for example, if you change a parameter attribute to span all parameter sets rather than individual parameter sets). Please read the error thoroughly and examine the relevant code before deciding that an error is a false positive, and contact the Azure PowerShell team if you have questions. If you are releasing a preview module, are releasing during a breaking change release, or have determined that the error is a false positive, please follow these instructions:
34-
- Copy each of the errors you would like to suppress directly from the BreakingChangeIssues.csv file output in the Jenkins build
35-
- Paste each of these error into the [BreakingChangeIssues.csv file](https://github.com/Azure/azure-powershell/blob/preview/tools/StaticAnalysis/Exceptions/BreakingChangeIssues.csv) in our GitHub repo. Note that you will need to edit this file in a text editor rather than Excel to prevent parsing errors.
36-
- Push the changes to the .csv file and ensure the errors no longer show up in the BreakingChangeIssues.csv file output from the Jenkins build.
33+
If you make a change that could cause a breaking change, it will be listed in `BreakingChangeIssues.csv`. Please look at each of these errors in this file, and if they do indeed introduce a breaking change in a non-breaking change release, please revert the change that caused this violation.
34+
35+
_Note_: Sometimes the error listed in the .csv file can be a false positive (for example, if you change a parameter attribute to span all parameter sets rather than individual parameter sets). Please read the error thoroughly and examine the relevant code before deciding that an error is a false positive, and contact the Azure PowerShell team if you have questions. If you are releasing a preview module, are releasing during a breaking change release, or have determined that the error is a false positive, please follow these instructions to suppress the errors:
36+
37+
- Download the `BreakingChangeIssues.csv` file from the Jenkins build
38+
- Open the file using a text editor (such as VS Code) and copy each of the errors you'd like to suppress
39+
- Paste each of these errors into the `BreakingChangeIssues.csv` file found in their respective [module folder](../tools/StaticAnalysis/Exceptions) (_e.g._, if a breaking change is being suppressed for Compute, then you would paste the corresponding line(s) in the `tools/StaticAnalysis/Exceptions/AzureRM.Compute/BreakingChangeIssues.csv` file) using the same text editor
40+
- Push the changes to the .csv file and ensure the errors no longer show up in the `BreakingChangeIssues.csv` file output from the Jenkins build.
3741

3842
We take breaking changes very seriously, so please be mindful about the violations that you suppress in our repo.
3943

4044
### Signature Issues
4145
Signature issues occur when your cmdlets do not follow PowerShell standards. Please check [this page](https://github.com/Azure/azure-powershell/wiki/PowerShell-Cmdlet-Design-Guidelines) to ensure you are following PowerShell guidelines. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
46+
47+
- Download the `SignatureIssues.csv` file from the Jenkins build
48+
- Open the file using a text editor (such as VS Code) and copy each of the errors you'd like to suppress
49+
- Paste each of these errors into the `SignatureIssues.csv` file found in their respective [module folder](../tools/StaticAnalysis/Exceptions) (_e.g.,_ if a signature issue is being suppressed for Sql, then you would paste the corresponding line(s) in the `tools/StaticAnalysis/Exceptions/AzureRM.Sql/SignatureIssues.csv` file) using the same text editor
4250
- Copy each of the errors you would like to suppress directly from the SignatureIssues.csv file output in the Jenkins build
43-
- Paste each of these error into the [SignatureIssues.csv file](https://github.com/Azure/azure-powershell/blob/preview/tools/StaticAnalysis/Exceptions/SignatureIssues.csv) in our GitHub repo. Note that you will need to edit this file in a text editor rather than Excel to prevent parsing errors.
44-
- Push the changes to the .csv file and ensure the errors no longer show up in the SignatureIssues.csv file output from the Jenkins build.
51+
- Push the changes to the .csv file and ensure the errors no longer show up in the `SignatureIssues.csv` file output from the Jenkins build.
4552

4653
### Help Issues
4754
Most help issues that cause StaticAnalysis to fail occur when help has not been added for a particular cmdlet. If you have not generated help for your new cmdlets, please follow the instructions [here](https://github.com/Azure/azure-powershell/blob/preview/documentation/help-generation.md). If this is not the issue, follow the steps listed under "Remediation" for each violation listed in HelpIssues.csv.

tools/StaticAnalysis/Exceptions/Azure/MissingAssemblies.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Networking","Microsoft.Web.Hosting","7.1.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Hosting referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"
88
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Services","Microsoft.Web.Delegation","7.1.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Delegation referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"
99
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Services","Microsoft.Web.Hosting","7.1.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Hosting referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"
10+
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Services","Microsoft.Web.Administration","7.0.0.0","Microsoft.Web.Delegation","0","3000","Missing assembly Microsoft.Web.Administration referenced from Microsoft.Web.Delegation","Ensure that the assembly is included in the Wix file or directory"
1011
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Services","Microsoft.Web.Administration","7.0.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Administration referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"
1112
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Services","Microsoft.Web.Deployment.Tracing","9.0.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Deployment.Tracing referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"
1213
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Sql","Microsoft.Web.Administration","7.0.0.0","Microsoft.Web.Delegation","0","3000","Missing assembly Microsoft.Web.Administration referenced from Microsoft.Web.Delegation","Ensure that the assembly is included in the Wix file or directory"
1314
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Sql","Microsoft.Web.Administration","7.0.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Administration referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"
14-
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Sql","Microsoft.Web.Hosting","7.1.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Hosting referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"
15+
"C:\azure-powershell\src\Package\Debug\ServiceManagement\Azure\Sql","Microsoft.Web.Hosting","7.1.0.0","Microsoft.Web.Deployment","0","3000","Missing assembly Microsoft.Web.Hosting referenced from Microsoft.Web.Deployment","Ensure that the assembly is included in the Wix file or directory"

0 commit comments

Comments
 (0)