# SPDX-License-Identifier: MIT
#
# Copyright (c) 2023 Intercreate, Inc.
# Author: J.P. Hutchins <jp@intercreate.io>
#
# Python(black)-inspired .clang-format for C repositories
#
# Includes Zephyr and Arm macro compatibility

---
BasedOnStyle: Google

AlignAfterOpenBracket: BlockIndent
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
  AfterCaseLabel: false
  AfterClass: false
  AfterControlStatement: MultiLine
  AfterEnum: false
  AfterFunction: false
  AfterNamespace: false
  AfterObjCDeclaration: false
  AfterStruct: false
  AfterUnion: false
  AfterExternBlock: false
  BeforeCatch: false
  BeforeElse: false
  IndentBraces: false
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  SplitEmptyNamespace: false
  BeforeLambdaBody: false
  BeforeWhile: false
BitFieldColonSpacing: After
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BreakStringLiterals: true
ColumnLimit: 100
DerivePointerAlignment: false
IndentCaseBlocks: true
IndentCaseLabels: false
IndentWidth: 4
MaxEmptyLinesToKeep: 2
PointerAlignment: Middle
SortIncludes: CaseSensitive
SpaceBeforeParens: ControlStatementsExceptControlMacros
UseTab: Never
