Skip to content

Commit

Permalink
add clang-format version to format-cxxcode (microsoft#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
strega-nil authored Apr 2, 2021
1 parent e70d42b commit bcd8c5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions azure-pipelines/Format-CxxCode.ps1
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#! /usr/bin/env pwsh

[CmdletBinding()]
$Root = Resolve-Path -LiteralPath "$PSScriptRoot/.."

Expand Down Expand Up @@ -25,6 +27,9 @@ if ([String]::IsNullOrEmpty($clangFormat) -or -not (Test-Path $clangFormat))
throw
}

$clangFormatVersion = "$(& $clangFormat --version)".Trim()
"Using $clangFormatVersion located at $clangFormat" | Write-Host

$files = Get-ChildItem -Recurse -LiteralPath "$Root/src" -Filter '*.cpp'
$files += Get-ChildItem -Recurse -LiteralPath "$Root/src" -Filter '*.c'
$files += Get-ChildItem -Recurse -LiteralPath "$Root/include/vcpkg" -Filter '*.h'
Expand Down

0 comments on commit bcd8c5e

Please sign in to comment.