-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from Quansight-Labs/clang-format
Add clang-format file and update code style
- Loading branch information
Showing
4 changed files
with
546 additions
and
649 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
SpaceBeforeCtorInitializerColon: false | ||
DerivePointerAlignment: false | ||
PointerAlignment: Middle | ||
ColumnLimit: 80 | ||
AlwaysBreakTemplateDeclarations: true | ||
AlignAfterOpenBracket: AlwaysBreak | ||
AlwaysBreakAfterReturnType: None | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
BinPackParameters: true | ||
PenaltyReturnTypeOnItsOwnLine: 1000 | ||
IndentPPDirectives: AfterHash | ||
MaxEmptyLinesToKeep: 2 | ||
|
||
# Macros that aren't followed by a semi-colon | ||
StatementMacros: | ||
- PyObject_HEAD |
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,16 @@ | ||
steps: | ||
- bash: | | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||
sudo add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" | ||
sudo apt-get update | ||
sudo apt-get install -y clang-format-8 | ||
displayName: Install clang-format | ||
- bash: | | ||
clang-format-8 -i uarray/_uarray_dispatch.cxx | ||
DIFF=$(git diff) | ||
if [ $DIFF != "" ]; then | ||
echo "Detected formatting errors, suggested changes below:" | ||
git diff | ||
exit 1 | ||
fi | ||
displayName: Run clang-format |
Oops, something went wrong.