Commit ef80517cfcabe5353fbe2430bc404027292419c8
1 parent
bf24dafc
Update readme with information about used coding guidelines and clang-format
Showing
2 changed files
with
98 additions
and
1 deletions
.clang-format
0 → 100644
| 1 | +--- | |
| 2 | +Language: Cpp | |
| 3 | +# BasedOnStyle: LLVM | |
| 4 | +AccessModifierOffset: -2 | |
| 5 | +AlignAfterOpenBracket: Align | |
| 6 | +AlignConsecutiveAssignments: false | |
| 7 | +AlignConsecutiveDeclarations: false | |
| 8 | +AlignEscapedNewlinesLeft: false | |
| 9 | +AlignOperands: true | |
| 10 | +AlignTrailingComments: true | |
| 11 | +AllowAllParametersOfDeclarationOnNextLine: true | |
| 12 | +AllowShortBlocksOnASingleLine: false | |
| 13 | +AllowShortCaseLabelsOnASingleLine: false | |
| 14 | +AllowShortFunctionsOnASingleLine: All | |
| 15 | +AllowShortIfStatementsOnASingleLine: false | |
| 16 | +AllowShortLoopsOnASingleLine: false | |
| 17 | +AlwaysBreakAfterDefinitionReturnType: None | |
| 18 | +AlwaysBreakAfterReturnType: None | |
| 19 | +AlwaysBreakBeforeMultilineStrings: false | |
| 20 | +AlwaysBreakTemplateDeclarations: false | |
| 21 | +BinPackArguments: true | |
| 22 | +BinPackParameters: true | |
| 23 | +BraceWrapping: | |
| 24 | + AfterClass: false | |
| 25 | + AfterControlStatement: false | |
| 26 | + AfterEnum: false | |
| 27 | + AfterFunction: false | |
| 28 | + AfterNamespace: false | |
| 29 | + AfterObjCDeclaration: false | |
| 30 | + AfterStruct: false | |
| 31 | + AfterUnion: false | |
| 32 | + BeforeCatch: false | |
| 33 | + BeforeElse: false | |
| 34 | + IndentBraces: false | |
| 35 | +BreakBeforeBinaryOperators: None | |
| 36 | +BreakBeforeBraces: Attach | |
| 37 | +BreakBeforeTernaryOperators: true | |
| 38 | +BreakConstructorInitializersBeforeComma: false | |
| 39 | +BreakAfterJavaFieldAnnotations: false | |
| 40 | +BreakStringLiterals: true | |
| 41 | +ColumnLimit: 80 | |
| 42 | +CommentPragmas: '^ IWYU pragma:' | |
| 43 | +ConstructorInitializerAllOnOneLineOrOnePerLine: false | |
| 44 | +ConstructorInitializerIndentWidth: 4 | |
| 45 | +ContinuationIndentWidth: 4 | |
| 46 | +Cpp11BracedListStyle: true | |
| 47 | +DerivePointerAlignment: false | |
| 48 | +DisableFormat: false | |
| 49 | +ExperimentalAutoDetectBinPacking: false | |
| 50 | +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] | |
| 51 | +IncludeCategories: | |
| 52 | + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' | |
| 53 | + Priority: 2 | |
| 54 | + - Regex: '^(<|"(gtest|isl|json)/)' | |
| 55 | + Priority: 3 | |
| 56 | + - Regex: '.*' | |
| 57 | + Priority: 1 | |
| 58 | +IncludeIsMainRegex: '$' | |
| 59 | +IndentCaseLabels: false | |
| 60 | +IndentWidth: 2 | |
| 61 | +IndentWrappedFunctionNames: false | |
| 62 | +JavaScriptQuotes: Leave | |
| 63 | +JavaScriptWrapImports: true | |
| 64 | +KeepEmptyLinesAtTheStartOfBlocks: true | |
| 65 | +MacroBlockBegin: '' | |
| 66 | +MacroBlockEnd: '' | |
| 67 | +MaxEmptyLinesToKeep: 1 | |
| 68 | +NamespaceIndentation: None | |
| 69 | +ObjCBlockIndentWidth: 2 | |
| 70 | +ObjCSpaceAfterProperty: false | |
| 71 | +ObjCSpaceBeforeProtocolList: true | |
| 72 | +PenaltyBreakBeforeFirstCallParameter: 19 | |
| 73 | +PenaltyBreakComment: 300 | |
| 74 | +PenaltyBreakFirstLessLess: 120 | |
| 75 | +PenaltyBreakString: 1000 | |
| 76 | +PenaltyExcessCharacter: 1000000 | |
| 77 | +PenaltyReturnTypeOnItsOwnLine: 60 | |
| 78 | +PointerAlignment: Right | |
| 79 | +ReflowComments: true | |
| 80 | +SortIncludes: true | |
| 81 | +SpaceAfterCStyleCast: false | |
| 82 | +SpaceBeforeAssignmentOperators: true | |
| 83 | +SpaceBeforeParens: ControlStatements | |
| 84 | +SpaceInEmptyParentheses: false | |
| 85 | +SpacesBeforeTrailingComments: 1 | |
| 86 | +SpacesInAngles: false | |
| 87 | +SpacesInContainerLiterals: true | |
| 88 | +SpacesInCStyleCastParentheses: false | |
| 89 | +SpacesInParentheses: false | |
| 90 | +SpacesInSquareBrackets: false | |
| 91 | +Standard: Cpp11 | |
| 92 | +TabWidth: 8 | |
| 93 | +UseTab: Never | |
| 94 | +... | |
| 95 | + | ... | ... |
readme.md
| ... | ... | @@ -81,12 +81,14 @@ Please use Github Issues to report any problems or enhancements or send us pull |
| 81 | 81 | - Use a topic branch to easily amend a pull request later, if necessary. |
| 82 | 82 | - Write [good commit messages][11]. |
| 83 | 83 | - Squash commits on the topic branch before opening a pull request. |
| 84 | - - Use the same coding style and spacing. | |
| 84 | + - Use the same [coding style and spacing][13] | |
| 85 | + (install clang-format and use it in the root directory: `clang-format -style=llvm openhantek/src/*`). | |
| 85 | 86 | - Open a [pull request][12] that relates to but one subject with a clear title and description |
| 86 | 87 | |
| 87 | 88 | [10]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request |
| 88 | 89 | [11]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html |
| 89 | 90 | [12]: https://help.github.com/articles/using-pull-requests |
| 91 | +[13]: http://llvm.org/docs/CodingStandards.html | |
| 90 | 92 | |
| 91 | 93 | ## Other open source software |
| 92 | 94 | * [SigRok](www.sigrok.org) | ... | ... |