From 3dee6782c3f8d611b3cda871b97778a34121df83 Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 4 Sep 2019 14:36:26 -0700 Subject: [PATCH] Ignore whitespace differences during code check (#13660) --- eng/scripts/CodeCheck.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index 8f1115be47..a072589565 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -169,7 +169,7 @@ try { Write-Host "Run git diff to check for pending changes" # Redirect stderr to stdout because PowerShell does not consistently handle output to stderr - $changedFiles = & cmd /c 'git --no-pager diff --ignore-space-at-eol --name-only 2>nul' + $changedFiles = & cmd /c 'git --no-pager diff --ignore-space-change --name-only 2>nul' # Temporary: Disable check for blazor js file $changedFilesExclusion = "src/Components/Web.JS/dist/Release/blazor.server.js" @@ -179,7 +179,7 @@ try { if ($file -eq $changedFilesExclusion) {continue} $filePath = Resolve-Path "${repoRoot}/${file}" LogError "Generated code is not up to date in $file. You might need to regenerate the reference assemblies or project list (see docs/ReferenceAssemblies.md and docs/ReferenceResolution.md)" -filepath $filePath - & git --no-pager diff --ignore-space-at-eol $filePath + & git --no-pager diff --ignore-space-change $filePath } } }