mirror of
https://github.com/Ed94/format_style.git
synced 2024-11-10 03:44:54 -08:00
18 lines
525 B
PowerShell
18 lines
525 B
PowerShell
|
[string[]] $include = '*.h', '*.hh', '*.hpp', '*.c', '*.cc', '*.cpp'
|
||
|
[string[]] $exclude = ''
|
||
|
|
||
|
Write-Host "Beginning format...`n"
|
||
|
|
||
|
# Format the files.
|
||
|
$formatParams = @(
|
||
|
'-i' # In-place
|
||
|
'-style=file' # Search for a .clang-format file in the parent directory of the source file.
|
||
|
'-verbose'
|
||
|
)
|
||
|
|
||
|
$targetFiles = @(Get-ChildItem -Recurse -Path $path_test -Include $include -Exclude $exclude | Select-Object -ExpandProperty FullName)
|
||
|
|
||
|
clang-format $formatParams $targetFiles
|
||
|
|
||
|
Write-Host "`nFormatting complete"
|