Skip to content

Commit 0cbbe96

Browse files
committed
Merge branch 'main' of https://github.com/Azure/azure-powershell into mergestorage
2 parents 4029165 + ad73d25 commit 0cbbe96

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,26 @@ try{
7474
Remediation = "Make sure that the ReadMe file of Sdk is loaded."
7575
}
7676
}
77-
# Prevent EOL changes detected
78-
git config --global core.autocrlf false
77+
7978
# See if the code is completely the same as we generated
8079
$changes = git status ".\Generated" --porcelain
8180
if ($changes -ne $null){
82-
$changes = $changes.replace(" ", "`n")
83-
$ExceptionList += [GeneratedSdkIssue]@{
81+
# Prevent EOL changes detected
82+
git config --global core.safecrlf false
83+
git config --global core.autocrlf true
84+
$diff = git diff
85+
if($diff -ne $null){
86+
$changes = $changes.replace(" ", "`n")
87+
$ExceptionList += [GeneratedSdkIssue]@{
8488
Module = $ModuleName;
8589
Sdk = $_;
8690
Severity = 1;
8791
ProblemId = $GenSdkChanged
8892
Description = "Generated code for $ModuleName is not up to date or you have updated generated Sdk."
8993
Remediation = "You may need to rebase on the latest main, regenerate code accroding to README.md file under $_, and make sure no more updates based on generated files."
94+
}
9095
}
96+
9197
}
9298
Set-Location $SavePath
9399
}

tools/StaticAnalysis/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public class Program
4040
"MissingAssemblies.csv",
4141
"SignatureIssues.csv",
4242
"ExampleIssues.csv",
43-
"UXMetadataIssues.csv"
43+
"UXMetadataIssues.csv",
44+
"GeneratedSdkIssues.csv"
4445
};
4546

4647
private static string ExceptionsDirectory { get; set; }

0 commit comments

Comments
 (0)