1 2# Copyright 2017 Daniel James. 3# Distributed under the Boost Software License, Version 1.0. (See accompanying 4# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6# Using clang format 4.0 7# http://llvm.org/releases/4.0.0/tools/clang/docs/ClangFormatStyleOptions.html 8 9BasedOnStyle: LLVM 10 11# Basic settings 12ColumnLimit: 80 13NamespaceIndentation: All 14ContinuationIndentWidth: 4 15IndentWidth: 4 16UseTab: Never 17Language: Cpp 18Standard: Cpp03 19 20# Code layout 21AlignAfterOpenBracket: AlwaysBreak 22AlignTrailingComments: true 23AllowShortBlocksOnASingleLine: true 24AllowShortFunctionsOnASingleLine: true 25AllowShortIfStatementsOnASingleLine: true 26BinPackParameters: false 27BreakBeforeBraces: Custom 28ConstructorInitializerAllOnOneLineOrOnePerLine: true 29BreakConstructorInitializersBeforeComma: true 30BraceWrapping: 31 AfterNamespace: true 32 AfterClass: true 33 AfterStruct: true 34 AfterUnion: true 35 AfterEnum: true 36 AfterFunction: true 37 AfterControlStatement: false 38 BeforeCatch: false 39 BeforeElse: true 40PointerAlignment: Left 41 42PenaltyReturnTypeOnItsOwnLine: 1000 43 44# Include order 45 46IncludeCategories: 47 - Regex: '^<windows.h>$' 48 Priority: 10 49 - Regex: '^<boost/.*>$' 50 Priority: 30 51 - Regex: '^<.*>$' 52 Priority: 20 53 - Regex: '^".*"$' 54 Priority: 40 55 56# Boost specific stuff 57ForEachMacros: [ BOOST_FOREACH, QUICKBOOK_FOR ] 58