Ignore whitespace differences during code check (#13660)
This commit is contained in:
parent
e0ee04237a
commit
3dee6782c3
|
|
@ -169,7 +169,7 @@ try {
|
||||||
Write-Host "Run git diff to check for pending changes"
|
Write-Host "Run git diff to check for pending changes"
|
||||||
|
|
||||||
# Redirect stderr to stdout because PowerShell does not consistently handle output to stderr
|
# 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
|
# Temporary: Disable check for blazor js file
|
||||||
$changedFilesExclusion = "src/Components/Web.JS/dist/Release/blazor.server.js"
|
$changedFilesExclusion = "src/Components/Web.JS/dist/Release/blazor.server.js"
|
||||||
|
|
@ -179,7 +179,7 @@ try {
|
||||||
if ($file -eq $changedFilesExclusion) {continue}
|
if ($file -eq $changedFilesExclusion) {continue}
|
||||||
$filePath = Resolve-Path "${repoRoot}/${file}"
|
$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
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue