You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/Debugging-StaticAnalysis-Errors.md
+16-9Lines changed: 16 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,10 @@ d:\workspace\powershell\build.proj(511,5): error MSB3073: The command "d:\worksp
18
18
## Where to find StaticAnalysis reports
19
19
20
20
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`.
23
23
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
25
25
```
26
26
msbuild build.proj
27
27
```
@@ -30,18 +30,25 @@ msbuild build.proj
30
30
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.
31
31
32
32
### 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.
37
41
38
42
We take breaking changes very seriously, so please be mindful about the violations that you suppress in our repo.
39
43
40
44
### Signature Issues
41
45
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
42
50
- 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.
45
52
46
53
### Help Issues
47
54
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.
Copy file name to clipboardExpand all lines: tools/StaticAnalysis/Exceptions/Azure/MissingAssemblies.csv
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,9 @@
7
7
"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"
8
8
"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"
9
9
"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"
10
11
"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"
11
12
"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"
12
13
"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"
13
14
"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