Include .c files too

This commit is contained in:
jpirnay
2026-04-04 17:36:47 +02:00
parent 9baded03ed
commit b9d4b54c5d
+3 -3
View File
@@ -109,16 +109,16 @@ function Test-Excluded($fullPath) {
}
if ($g) {
# Only git-modified *.cpp / *.h files
# Only git-modified *.cpp / *.c / *.h files
# Covers both staged and unstaged changes
$files = @(git -C $repoRoot diff --name-only HEAD) +
@(git -C $repoRoot diff --name-only --cached) |
Sort-Object -Unique |
Where-Object { $_ -match '\.(cpp|h)$' } |
Where-Object { $_ -match '\.(cpp|c|h)$' } |
ForEach-Object { Get-Item (Join-Path $repoRoot $_) -ErrorAction SilentlyContinue } |
Where-Object { $_ -and -not (Test-Excluded $_.FullName) }
} else {
$files = Get-ChildItem -Path $repoRoot -Recurse -Include *.cpp, *.h -File |
$files = Get-ChildItem -Path $repoRoot -Recurse -Include *.cpp, *.c, *.h -File |
Where-Object { -not (Test-Excluded $_.FullName) }
}