Skip to content

Commit 635b919

Browse files
authored
[ENG] Ignore comments updates for generated sdk change (#27499)
1 parent ce59d26 commit 635b919

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1

+3-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ try {
196196
# Prevent EOL changes detected
197197
git config --global core.safecrlf false
198198
git config --global core.autocrlf true
199-
$diff = git diff ".\Generated"
199+
# Use a single regex to ignore comments in .cs and .psd1 files
200+
$diff = git diff ".\Generated" --ignore-matching-lines="^\s*(//|/\*.*\*/|#)"
201+
200202
if($diff -ne $null){
201203
$changes = $changes.replace(" ", "`n")
202204
$ExceptionList += [GeneratedSdkIssue]@{

0 commit comments

Comments
 (0)