Skip to content

Commit

Permalink
Adding .clang-format file
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jun 20, 2017
1 parent e853e98 commit 80fa653
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions .clang-format
@@ -0,0 +1,112 @@
# Copyright (c) 2016 Thomas Heller
# Copyright (c) 2016-2017 Hartmut Kaiser
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

# This .clang-format file is a suggested configuration file for formatting
# source code for the HPX project.
#
# Here are a couple of guidleines of how to use this file.
#
# - You should use this file for creating an initial formatting for new files.
#
# - Please separate edits which are pure formatting into separate commits
# separated from edits changing any of the code.
#
# - Please do _not_ configure your editor to automatically format the source
# file while saving edits to disk
# - Please do _not_ automatically reformat a full source file without dire need.

---
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: "///"
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: false
# ForEachMacros: ['']
IncludeCategories:
- Regex: '^<hpx/config\.hpp>'
Priority: 1
- Regex: '^<hpx/.*\.hpp>'
Priority: 2
- Regex: '^<hpx/parallel/.*\.hpp>'
Priority: 3
- Regex: '^<.*'
Priority: 4
- Regex: '.*'
Priority: 5
# IncludeIsMainRegex: ''
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
# MacroBlockBegin: ''
# MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: false
SortIncludes: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 4
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
...

0 comments on commit 80fa653

Please sign in to comment.