cd /news/developer-tools/clang-format-file · home topics developer-tools article
[ARTICLE · art-9898] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Clang format file.

This is a configuration file for clang-format, a code formatting tool, created by Ingmar Delsink. It specifies formatting rules for C++ code, including a tab width and indent width of 4, no tab characters, and C++11 standard compatibility. The file also enables alignment of consecutive assignments and sets pointer alignment to the left.

read12 min views22 publishedMar 7, 2016

#########

#BasedOnStyle:

TabWidth: 4

IndentWidth: 4

UseTab: Never

Language: Cpp

Standard: Cpp11

PointerAlignment: Left

AccessModifierOffset: 0 AlignAfterOpenBracket: false

AlignConsecutiveAssignments: true

AlignEscapedNewlinesLeft: true

AlignOperands: false

AlignTrailingComments: true

AllowAllParametersOfDeclarationOnNextLine: false

AllowShortBlocksOnASingleLine: false

AllowShortCaseLabelsOnASingleLine: true

AllowShortFunctionsOnASingleLine: false

AllowShortIfStatementsOnASingleLine: false

AllowShortLoopsOnASingleLine: false

AlwaysBreakBeforeMultilineStrings: false

AlwaysBreakTemplateDeclarations: false

#BinPackArguments: false

BinPackParameters: false

#BraceWrapping:

#BreakAfterJavaFieldAnnotations:

BreakBeforeBinaryOperators: false

BreakBeforeBraces: Attach

BreakBeforeTernaryOperators: false

BreakConstructorInitializersBeforeComma: false

#BreakStringLiterals:

ColumnLimit: 80

CommentPragmas: ''

ConstructorInitializerAllOnOneLineOrOnePerLine: false

ConstructorInitializerIndentWidth: 0

ContinuationIndentWidth: 0

Cpp11BracedListStyle: false

DerivePointerBinding: false

#DisableFormat:

#ExperimentalAutoDetectBinPacking:

#ForEachMacros:

#IncludeCategories:

IndentCaseLabels: false

IndentFunctionDeclarationAfterType: false

#IndentWrappedFunctionNames:

#KeepEmptyLinesAtTheStartOfBlocks:

#MacroBlockBegin:

#MacroBlockEnd:

MaxEmptyLinesToKeep: 2 NamespaceIndentation: None

#ObjCBlockIndentWidth:

ObjCSpaceAfterProperty: true

ObjCSpaceBeforeProtocolList: true

PenaltyBreakBeforeFirstCallParameter: 100

PenaltyBreakComment: 100

PenaltyBreakFirstLessLess: 0

PenaltyBreakString: 100

PenaltyExcessCharacter: 1

PenaltyReturnTypeOnItsOwnLine: 20

#PointerAlignment:

#ReflowComments: true (from v3.9)

#SortIncludes: false (from v3.9)

SpaceAfterCStyleCast: false

SpaceBeforeAssignmentOperators: true

SpaceBeforeParens: Always

SpaceInEmptyParentheses: false

SpacesBeforeTrailingComments: 1 SpacesInAngles: false

SpacesInCStyleCastParentheses: false

SpacesInContainerLiterals: false

SpacesInParentheses: false

SpacesInSquareBrackets: false

── more in #developer-tools 4 stories · sorted by recency
── more on @ingmar delsink 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/clang-format-file] indexed:0 read:12min 2016-03-07 ·