Skip to content

Commit

Permalink
chore: add clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Mar 24, 2018
1 parent 8f1b1c4 commit 1b46c00
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Language: Cpp
BasedOnStyle: Google
IndentWidth: 8
AlignAfterOpenBracket: Align
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AllowShortFunctionsOnASingleLine: None
BinPackArguments: true
BinPackParameters: true
BreakBeforeBraces: Linux
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 72
Cpp11BracedListStyle: false
IndentCaseLabels: false
IndentWrappedFunctionNames: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PointerAlignment: Right
ReflowComments: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 4
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
UseTab: Always

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"scripts": {
"test": "make test",
"commitlint": "commitlint",
"format": "git-clang-format --style=file",
"precommit": "git-clang-format --style=file",
"commitmsg": "commitlint -e $GIT_PARAMS",
"build-changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"update-changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
Expand All @@ -33,6 +35,7 @@
"@commitlint/cli": "^6.1.3",
"@commitlint/config-conventional": "^6.1.3",
"@commitlint/travis-cli": "^6.1.3",
"clang-format": "^1.2.2",
"commitlint": "^6.1.3",
"husky": "^0.14.3",
"travis-cli": "^1.0.9"
Expand Down

0 comments on commit 1b46c00

Please sign in to comment.