# Copyright (c) 2016 Thomas Heller
# Copyright (c) 2016-2018 Hartmut Kaiser
#
# SPDX-License-Identifier: BSL-1.0
# 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 guidelines 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 isolated commits
#   keeping those distinct 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_ reformat a full source file without dire need.

# PLEASE NOTE: This file requires clang-format V11.0

---
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:
    AfterCaseLabel: true
    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: "///"
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
#ExperimentalAutoDetectBinPacking: true # Do weird reformatting
FixNamespaceComments: true
# ForEachMacros: ['']
IncludeCategories:
  - Regex:           '^<hpx/config\.hpp>'
    Priority:        1
  - Regex:           '^<hpx/config/.*\.hpp>'
    Priority:        2
  - Regex:           '^<hpx/.*/config\.hpp>'
    Priority:        3
  - Regex:           '^<hpx/.*/config/defines\.hpp>'
    Priority:        4
  - Regex:           '^<hpx/.*\.hpp>'
    Priority:        5
  - Regex:           '^<hpx/parallel/.*\.hpp>'
    Priority:        6
  - Regex:           '^<.*'
    Priority:        7
  - Regex:           '.*'
    Priority:        8
# IncludeIsMainRegex: ''
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
# MacroBlockBegin: ''
# MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
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
...
