Ignore whitespace differences during code check (#13660)

This commit is contained in:
John Luo 2019-09-04 14:36:26 -07:00 committed by GitHub
parent e0ee04237a
commit 3dee6782c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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
}
}
}