summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-03-31 15:57:10 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-03-31 15:57:10 +0200
commit34d02a3ddf4753d512863b064998d163dc7e1da4 (patch)
treefc509e9c17a06e285c87d487b4cf2b2edf0cc1c7 /.clang-format
parentd9a6ec88e47b9c3c7993018f4f2be13d55b8fca2 (diff)
Update .clang-format control file
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format30
1 files changed, 18 insertions, 12 deletions
diff --git a/.clang-format b/.clang-format
index ffa57a83d..28c60bc2c 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,7 +1,7 @@
#
# clang-format control file for the FLTK project.
#
-# Copyright 2017-2020 by Bill Spitzak and others.
+# Copyright 2017-2022 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -23,10 +23,11 @@
#
# DO NOT USE WITHOUT CHECKING THE RESULT OF FORMATTING FOR CORRECTNESS
# AND COMPATIBILITY WITH THE FLTK CMP!
+# https://www.fltk.org/cmp.php#CODING_STANDARDS
#
# For more information about clang-format please refer to the online docs at:
-# http://clang.llvm.org/docs/ClangFormat.html
-# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+# https://clang.llvm.org/docs/ClangFormat.html
+# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
# Embedded comments ("clang-format pragma's") in the source code:
# // clang-format off
@@ -37,10 +38,10 @@
# This is particularly useful for embedded pixmaps and other tables
# like menu arrays that are pre-formatted for better readability.
-# The options used for FLTK are based on pre-defined style options of LLVM,
+# The options used for FLTK are based on predefined style options of LLVM,
# which are also the default settings of clang-format.
# For a full list of LLVM settings please use
-# clang-format -style=llvm -dump-config
+# clang-format -style=llvm -dump-config
# FLTK settings (currently experimental).
@@ -68,12 +69,12 @@ UseTab: Never
# Should we extend code lines beyond 80 columns ?
# Default: 80
-ColumnLimit: 120
+ColumnLimit: 100
# The FLTK CMP requires that case labels are indented (LLVM: false)
IndentCaseLabels: true
-# There are sometimes more than 1 empty lines; should we keep 2 or more ?
+# Should we keep two or more consecutive empty lines ?
# LLVM default is 1.
MaxEmptyLinesToKeep: 2
@@ -83,6 +84,7 @@ MaxEmptyLinesToKeep: 2
# following "Allow..." statements (leave them commented out):
#
# LLVM default values:
+#
# AllowShortBlocksOnASingleLine: false
# AllowShortFunctionsOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: false
@@ -101,22 +103,26 @@ AllowShortFunctionsOnASingleLine: Inline
AlignEscapedNewlinesLeft: true
-# Include files should be left as-is until we know we can sort them
-# without any bad side effects (LLVM: true)
+# Include files should be left as-is until we *know* we can
+# sort them without bad side effects.
+# LLVM default: true
SortIncludes: false
-# Multiple constructor initializers must be on consecutive lines:
+# Multiple constructor initializers must be on consecutive lines.
+# Note: this is NOT (always) true in current FLTK code!
BreakConstructorInitializersBeforeComma: true
-# Constructor initializers will be indented by 2 spaces (LLVM: 4):
+# Constructor initializers will be indented by 2 spaces.
+# LLVM default: 4
ConstructorInitializerIndentWidth: 2
# Continuation lines (if automatically wrapped) may be indented differently.
# This does not apply to function call arguments which are aligned to the
-# opening bracket. LLVM (default): 4
+# opening bracket.
+# LLVM default: 4
# ContinuationIndentWidth: 2
# Most of FLTK's code uses 'void *p' as opposed to 'void* p'.