Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Language: Cpp
BasedOnStyle: WebKit

AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: true
#AlignConsecutiveAssignments: Consecutive
#AlignConsecutiveBitFields: Consecutive
Expand All @@ -14,14 +14,14 @@ AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: TopLevel
AllowShortNamespacesOnASingleLine: false
BreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
Expand Down Expand Up @@ -83,7 +83,10 @@ IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
KeepEmptyLines:
AtEndOfFile: false
AtStartOfBlock: false
AtStartOfFile: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 3
Expand All @@ -92,7 +95,7 @@ ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 40
PenaltyBreakAssignment: 50
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
Expand All @@ -102,6 +105,8 @@ PenaltyExcessCharacter: 75
PenaltyReturnTypeOnItsOwnLine: 50
PointerAlignment: Left
ReflowComments: false
RemoveEmptyLinesInUnwrappedLines: true
SkipMacroDefinitionBody: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
Expand All @@ -113,7 +118,7 @@ SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyBraces: Never
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
Expand All @@ -126,6 +131,8 @@ StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
#TemplateNames:
#TypeNames:
UseTab: Never
#...

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ jobs:
# the console output).
- desc: "clang-format"
nametag: clang-format
runner: ubuntu-24.04
runner: ubuntu-26.04
cxx_std: 17
extra_artifacts: "src/*.*"
python_ver: "3.10"
Expand All @@ -318,8 +318,8 @@ jobs:
skip_tests: 1
setenvs: export SKIP_SYSTEM_DEPS_INSTALL=1 SKIP_APT_GET_UPDATE=1
INSTALL_OPENCV=0 QT_VERSION=0 USE_LIBHEIF=0
EXTRA_DEP_PACKAGES="clang-format-17"
CLANG_FORMAT_EXE=clang-format-17
CLANG_FORMAT_EXE=clang-format-22
EXTRA_DEP_PACKAGES="clang-format-22"

- desc: latest releases gcc15 C++23 py3.12 avx2 exr3.4 ocio2.4
nametag: linux-latest-releases
Expand Down
2 changes: 1 addition & 1 deletion src/cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ endif ()
# Note: skip all of this checking, setup, and cmake-format target if this
# is being built as a subproject.
if (PROJECT_IS_TOP_LEVEL)
set (CLANG_FORMAT_EXE_HINT "" CACHE PATH "clang-format executable's directory (will search if not specified")
set_cache (CLANG_FORMAT_EXE_HINT "" "clang-format executable's directory (will search if not specified")
set (CLANG_FORMAT_INCLUDES "src/*.h" "src/*.cpp" "testsuite/*.cpp" "testsuite/*.h"
CACHE STRING "Glob patterns to include for clang-format")
set (CLANG_FORMAT_EXCLUDES "*pugixml*" "*SHA1*" "*/farmhash.cpp"
Expand Down
Loading