Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
aml
Commits
0cd35317
Commit
0cd35317
authored
Apr 21, 2020
by
Swann Perarnau
Browse files
Merge branch 'clang-format' into 'staging'
clang-format formatting See merge request
!123
parents
c0ce7e25
84f2fb80
Pipeline
#10220
passed with stages
in 3 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.clang-format
0 → 100644
View file @
0cd35317
# Copyright 2019 UChicago Argonne, LLC.
# (c.f. AUTHORS, LICENSE)
#
# This file is part of the AML project.
# For more info, see https://xgitlab.cels.anl.gov/argo/aml
#
# SPDX-License-Identifier: BSD-3-Clause
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: 'config\.h'
Priority: 1
- Regex: 'test.*'
Priority: 1
- Regex: 'aml\.h'
Priority: 3
- Regex: 'aml/.*'
Priority: 4
- Regex: '^<.*\.h>'
Priority: 2
- Regex: '.*'
Priority: 5
IncludeIsMainRegex: 'aml\.h'
IndentCaseLabels: false
IndentWidth: 8
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: ForIndentation
...
.gitlab-ci.yml
View file @
0cd35317
variables
:
ARGOPKGS
:
"
https://xgitlab.cels.anl.gov/argo/argopkgs/-/archive/master/argopkgs-master.tar.gz"
DEFAULT_MERGE_TARGET
:
"
origin/staging"
stages
:
-
style
...
...
@@ -23,7 +24,7 @@ repoquality:
paths
:
-
.repoquality
c
heckpatch
:
c
lang-format
:
stage
:
style
except
:
-
/^wip.*/
...
...
@@ -32,9 +33,16 @@ checkpatch:
-
nix
-
kvm
script
:
-
nix run -f "$ARGOPKGS" checkpatch --command checkpatch.pl --ignore TRAILING_SEMICOLON --ignore MULTISTATEMENT_MACRO_USE_DO_WHILE include/aml/utils/inner-malloc.h
-
git ls-files '*.c' '*.h' | grep -vE "benchmarks|inner-malloc" >> .checkpatch.conf
-
nix run -f "$ARGOPKGS" checkpatch --command checkpatch.pl
-
rm -f clang-format-diff
-
target=$(git rev-parse $DEFAULT_MERGE_TARGET)
-
nix-shell "$ARGOPKGS" -A ci.aml-format --run "git-clang-format --diff $target > clang-format-diff"
-
lint=$(grep -v --color=never "did not modify any files" ||
true
)
-
if [ ! -z "$lint" ]; then exit 1; else exit 0; fi
artifacts
:
when
:
on_failure
paths
:
-
./clang-format-diff
expire_in
:
1 week
style:docs:
stage
:
style
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment