-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up CI with Azure Pipelines that checks that sources are clang-for…
…mat'd (#132) This script runs clang-format on the sources, then runs git status --porcelain on the result, redirected to stderr. If any output goes to stderr, Azure Pipelines marks the build as failed, which enforces that no changes were made to the repo by the clang-format pass. Resolves #88
- Loading branch information
1 parent
62482a6
commit a8e1358
Showing
4 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:: Copyright (c) Microsoft Corporation. | ||
:: SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
@echo off | ||
clang-format -style=file -i stl/inc/* stl/inc/cvt/* stl/inc/experimental/* stl/src/* 2>&1 | ||
echo If your build fails here, you need to format the following files with clang-format 8.0.1. | ||
git status --porcelain 1>&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
pool: 'STL' | ||
|
||
steps: | ||
- task: BatchScript@1 | ||
inputs: | ||
filename: 'azure-devops/enforce-clang-format.cmd' | ||
failOnStandardError: true | ||
displayName: 'Enforce clang-format' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters