aboutsummaryrefslogtreecommitdiffstats
path: root/dist/clangformat
diff options
context:
space:
mode:
Diffstat (limited to 'dist/clangformat')
-rw-r--r--dist/clangformat/.clang-format115
-rw-r--r--dist/clangformat/README.md22
2 files changed, 4 insertions, 133 deletions
diff --git a/dist/clangformat/.clang-format b/dist/clangformat/.clang-format
deleted file mode 100644
index 25df05eb26..0000000000
--- a/dist/clangformat/.clang-format
+++ /dev/null
@@ -1,115 +0,0 @@
-# .clang-format for Qt Creator
-#
-# This is for clang-format >= 5.0.
-#
-# The configuration below follows the Qt Creator Coding Rules [1] as closely as
-# possible. For documentation of the options, see [2].
-#
-# Use ../../tests/manual/clang-format-for-qtc/test.cpp for documenting problems
-# or testing changes.
-#
-# [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
-# [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html
-#
----
-Language: Cpp
-AccessModifierOffset: -4
-AlignAfterOpenBracket: Align
-AlignConsecutiveAssignments: false
-AlignConsecutiveDeclarations: false
-AlignEscapedNewlines: DontAlign
-AlignOperands: true
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: Inline
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterReturnType: None
-AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: true
-BinPackArguments: false
-BinPackParameters: false
-BraceWrapping:
- AfterClass: true
- AfterControlStatement: false
- AfterEnum: false
- AfterFunction: true
- AfterNamespace: false
- AfterObjCDeclaration: false
- AfterStruct: true
- AfterUnion: false
- BeforeCatch: false
- BeforeElse: false
- IndentBraces: false
- SplitEmptyFunction: false
- SplitEmptyRecord: false
- SplitEmptyNamespace: false
-BreakBeforeBinaryOperators: All
-BreakBeforeBraces: Custom
-BreakBeforeInheritanceComma: false
-BreakBeforeTernaryOperators: true
-BreakConstructorInitializersBeforeComma: false
-BreakConstructorInitializers: BeforeComma
-BreakAfterJavaFieldAnnotations: false
-BreakStringLiterals: false
-ColumnLimit: 100
-CommentPragmas: '^ IWYU pragma:'
-CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
-ConstructorInitializerIndentWidth: 4
-ContinuationIndentWidth: 4
-Cpp11BracedListStyle: true
-DerivePointerAlignment: false
-DisableFormat: false
-ExperimentalAutoDetectBinPacking: false
-FixNamespaceComments: true
-ForEachMacros:
- - forever # avoids { wrapped to next line
- - foreach
- - Q_FOREACH
- - BOOST_FOREACH
-IncludeCategories:
- - Regex: '^<Q.*'
- Priority: 200
-IncludeIsMainRegex: '(Test)?$'
-IndentCaseLabels: false
-IndentWidth: 4
-IndentWrappedFunctionNames: false
-JavaScriptQuotes: Leave
-JavaScriptWrapImports: true
-KeepEmptyLinesAtTheStartOfBlocks: false
-# Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between.
-MacroBlockBegin: ""
-MacroBlockEnd: ""
-MaxEmptyLinesToKeep: 1
-NamespaceIndentation: None
-ObjCBlockIndentWidth: 4
-ObjCSpaceAfterProperty: false
-ObjCSpaceBeforeProtocolList: true
-PenaltyBreakAssignment: 150
-PenaltyBreakBeforeFirstCallParameter: 300
-PenaltyBreakComment: 500
-PenaltyBreakFirstLessLess: 400
-PenaltyBreakString: 600
-PenaltyExcessCharacter: 50
-PenaltyReturnTypeOnItsOwnLine: 300
-PointerAlignment: Right
-ReflowComments: false
-SortIncludes: true
-SortUsingDeclarations: true
-SpaceAfterCStyleCast: true
-SpaceAfterTemplateKeyword: false
-SpaceBeforeAssignmentOperators: true
-SpaceBeforeParens: ControlStatements
-SpaceInEmptyParentheses: false
-SpacesBeforeTrailingComments: 1
-SpacesInAngles: false
-SpacesInContainerLiterals: false
-SpacesInCStyleCastParentheses: false
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-Standard: Cpp11
-TabWidth: 4
-UseTab: Never
diff --git a/dist/clangformat/README.md b/dist/clangformat/README.md
index 05fd065c01..26982360ae 100644
--- a/dist/clangformat/README.md
+++ b/dist/clangformat/README.md
@@ -1,6 +1,6 @@
# .clang-format for Qt Creator
-Alongside this file you find an EXPERIMENTAL .clang-format configuration file
+In you Qt Creator root there is an EXPERIMENTAL .clang-format configuration file
for the Qt Creator code base.
The current configuration is useful, but not fully in accordance with the
@@ -26,25 +26,11 @@ For more information about clang-format, see
## Set up Qt Creator for use with clang-format
-### Install the configuration file
-
-For a given source file to format, clang-format it will read the configuration
-from .clang-format in the closest parent directory for the file to format.
-
-Hence symlink/copy .clang-format from this directory to e.g. Qt Creator's top
-level directory:
-
-For Linux/macOS:
-
- $ cd $QTC_SOURCE
- $ ln -s dist/clangformat/.clang-format
-
-For Windows:
+### Configure Qt Creator
- $ cd $QTC_SOURCE
- $ copy dist\clangformat\.clang-format # Do not forget to keep this updated
+ 0. Enable experimental ClangFormat plugin to get C++ indentation based on it.
-### Configure Qt Creator
+ Or use an alternative way:
1. Enable the Beautifier plugin and restart to load it.