Skip to content

Commit

Permalink
Add formatting to Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed May 11, 2019
1 parent 0e1e16f commit e4e5d6f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ insert_final_newline = true
end_of_line = lf
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
9 changes: 9 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ trigger:
- master

jobs:
- job: ClangFormat
pool:
vmImage: 'ubuntu-16.04'
steps:
- script: scripts/check_style_docker.sh
displayName: Check format

- job: Linux
pool:
vmImage: 'ubuntu-16.04'
Expand All @@ -24,3 +31,5 @@ jobs:
vmImage: 'vs2017-win2016'
steps:
- template: .ci/azure-steps.yml


4 changes: 2 additions & 2 deletions scripts/check_style_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ CLANG_FORMAT=saschpe/clang-format:5.0.1

set -evx

docker run --rm -it ${CLANG_FORMAT} --version
docker run --rm -it -v "$(pwd)":/workdir -w /workdir ${CLANG_FORMAT} -style=file -sort-includes -i $(git ls-files -- '*.cpp' '*.hpp')
docker run --rm ${CLANG_FORMAT} --version
docker run --rm -v "$(pwd)":/workdir -w /workdir ${CLANG_FORMAT} -style=file -sort-includes -i $(git ls-files -- '*.cpp' '*.hpp')

git diff --exit-code --color

Expand Down

0 comments on commit e4e5d6f

Please sign in to comment.