Skip to content

Fix bugs in StaticAnalysis and change log check script #6446

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

Merged
merged 2 commits into from
Jun 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/CheckChangeLog.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ foreach ($File in $FilesChangedList)
}

# If a file in src/Common is updated, check for change log entry in Profile
if ($File.StartsWith("src/Common") -and ($UpdatedServicePaths | where { $_ -like "*Profile*" } | Measure-Object).Count -gt 0)
if (($File.StartsWith("src/Common") -or $File.StartsWith("src/ResourceManager/Common")) -and ($UpdatedServicePaths | where { $_ -like "*Profile*" } | Measure-Object).Count -gt 0)
{
continue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,6 @@
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption.SetAzureDiskEncryptionExtensionCommand","Set-AzureRmVMDiskEncryptionExtension","1","8420","Parameter set 'AADClientCertParameterSet' of cmdlet 'Set-AzureRmVMDiskEncryptionExtension' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.Extension.AzureDiskEncryption.SetAzureVMBackupExtension","Set-AzureRmVMBackupExtension","1","8100","Set-AzureRmVMBackupExtension Does not support ShouldProcess but the cmdlet verb Set indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.NewAzureVMDataDiskCommand","New-AzureRmVMDataDisk","1","8100","New-AzureRmVMDataDisk Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.AddAzureVMDataDiskCommand","Add-AzureRmVMDataDisk","1","8420","Parameter set 'VmNormalDiskParameterSetName' of cmdlet 'Add-AzureRmVMDataDisk' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.AddAzureVMDataDiskCommand","Add-AzureRmVMDataDisk","1","8420","Parameter set 'VmManagedDiskParameterSetName' of cmdlet 'Add-AzureRmVMDataDisk' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."
"C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.dll","Microsoft.Azure.Commands.Compute.AddAzureVMDataDiskCommand","Add-AzureRmVMDataDisk","1","8420","Parameter set 'VmScaleSetVMParameterSetName' of cmdlet 'Add-AzureRmVMDataDisk' contains at least one parameter with a position larger than four, which is discouraged.","Limit the number of positional parameters in a single parameter set to four or fewer."
2 changes: 1 addition & 1 deletion tools/StaticAnalysis/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private static void ConsolidateExceptionFiles(string exceptionsDirectory)
var exceptionFilePath = Path.Combine(exceptionsDirectory, exceptionFileName);
if (File.Exists(exceptionFilePath))
{
throw new IOException(string.Format("The file '{0}' already exists.", exceptionFilePath));
File.Delete(exceptionFilePath);
}

File.Create(exceptionFilePath).Close();
Expand Down
3 changes: 2 additions & 1 deletion tools/StaticAnalysis/SignatureVerifier/SignatureIssue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public bool Match(IReportRecord other)
result = string.Equals(record.ClassName, ClassName, StringComparison.OrdinalIgnoreCase) &&
string.Equals(record.Target, Target, StringComparison.OrdinalIgnoreCase) &&
(record.ProblemId == ProblemId) &&
record.Severity == Severity;
(record.Severity == Severity) &&
(record.Description == Description);

}

Expand Down