Skip to content

Commit

Permalink
Merge branch 'master' into macdmg
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored Feb 23, 2025
2 parents a912987 + 9b78cf9 commit a51c1e8
Show file tree
Hide file tree
Showing 1,394 changed files with 789,267 additions and 693,566 deletions.
8 changes: 7 additions & 1 deletion .ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ test -n "${DOCKER}" || {

DOCKER_COMPOSE=$(command -v podman-compose docker-compose | head -1)
test -n "${DOCKER_COMPOSE}" || {
DOCKER_COMPOSE="${DOCKER} compose" # TODO: check if supported
DOCKER_COMPOSE="${DOCKER} compose"
# check if supported
${DOCKER_COMPOSE} > /dev/null || {
echo "Cannot find podman-compose or docker-compose, and '${DOCKER_COMPOSE}' fails" >&2
echo "HINT: try installing podman-compose" >&2
exit 1
}
}

IMAGE_BUILD_DEPS=docker.io/qgis/qgis3-build-deps:latest
Expand Down
4 changes: 0 additions & 4 deletions .ci/test_blocklist_qt5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ test_core_openclutils
# Relies on a broken/unreliable 3rd party service
test_core_layerdefinition

# MSSQL requires the MSSQL docker
PyQgsProviderConnectionMssql
PyQgsStyleStorageMssql

4 changes: 0 additions & 4 deletions .ci/test_flaky.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ test_provider_wcsprovider
PyQgsWFSProviderGUI
# See https://github.com/qgis/QGIS/issues/48927
test_core_tiledownloadmanager

# Flaky, the ms odbc driver crashes a lot on the ubuntu docker image. Retest when
# the docker base image is upgraded
PyQgsMssqlProvider
174 changes: 135 additions & 39 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,123 +1,219 @@
Language: Cpp
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: No
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Never
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: All
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
IncludeCategories:
- Regex: '^<Q.*'
Priority: 300
- Regex: '^<qgs.*'
Priority: 200
- Regex: '<.*'
Priority: 400
- Regex: '^".*'
Priority: 100
- Regex: '.*'
Priority: 1
- Regex: "^<Q.*"
Priority: 300
- Regex: "^<qgs.*"
Priority: 200
- Regex: "<.*"
Priority: 400
- Regex: '^".*'
Priority: 100
- Regex: ".*"
Priority: 1

IncludeIsMainRegex: false
IncludeBlocks: Regroup
#IncludeBlocks: Regroup
IncludeIsMainSourceRegex: ""
IndentAccessModifiers: true
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: true
# should be:
# InsertBraces: true
# InsertNewlineAtEOF: true
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
# Do not add QT_BEGIN_NAMESPACE/QT_END_NAMESPACE as this will indent lines in between.
MacroBlockBegin: ""
MacroBlockEnd: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 150
PenaltyBreakBeforeFirstCallParameter: 5000
PenaltyBreakComment: 500
PenaltyBreakFirstLessLess: 400
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 600
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 10
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 5000
PointerAlignment: Right
ReflowComments: false
SortIncludes: false
PPIndentWidth: -1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
# should be:
# ReflowComments: true
ReflowComments: false
RemoveBracesLLVM: false
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: false
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Leave
SpacesInAngles: Leave
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: true
SpacesInLineCommentPrefix:
# should be:
# Minimum: 1
Minimum: 0
Maximum: -1
SpacesInParentheses: true
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
Standard: Cpp11
TabWidth: 2
UseTab: Never
Macros:
- SIP_ENUM_BASETYPE(x)=x
- SIP_MONKEYPATCH_SCOPEENUM_UNNEST(x,y)=x
AttributeMacros:
- SIP_SKIP

---

Language: ObjC
Language: ObjC

ObjCBlockIndentWidth: 4
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Checks: 'bugprone-*,-bugprone-easily-swappable-parameters,-bugprone-virtual-near-miss,-bugprone-suspicious-include'
HeaderFilterRegex: ''
25 changes: 25 additions & 0 deletions .docker/docker-compose-testing-mssql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: '3'

services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: QGIStestSQLServer1234
ports:
- 1433:1433

qgis-deps:
tty: true
image: qgis3-build-deps-binary-image
volumes:
- ${QGIS_WORKSPACE}:/root/QGIS
links:
- mssql
env_file:
- docker-variables.env
environment:
- LANG=C.UTF-8
- LC_ALL=en_US.UTF-8
cap_add:
- NET_ADMIN
8 changes: 0 additions & 8 deletions .docker/docker-compose-testing.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
version: '3'
services:

# Proving very fragile!
# mssql:
# image: microsoft/mssql-server-linux:2017-latest
# environment:
# ACCEPT_EULA: Y
# SA_PASSWORD: <YourStrong!Passw0rd>

httpbin:
image: kennethreitz/httpbin:latest

Expand All @@ -34,7 +27,6 @@ services:
- ${QGIS_WORKSPACE}:/root/QGIS
- ${QGIS_COMMON_GIT_DIR}:${QGIS_COMMON_GIT_DIR}
links:
# - mssql
- webdav
- minio
- httpbin
Expand Down
1 change: 1 addition & 0 deletions .docker/docker-qgis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ cmake \
-DENABLE_PGTEST=${WITH_QT5} \
-DENABLE_SAGA_TESTS=${WITH_QT5} \
-DENABLE_MSSQLTEST=${WITH_QT5} \
-DENABLE_MSSQLTEST_CPP=${WITH_QT5} \
-DENABLE_HANATEST=${WITH_QT5} \
-DENABLE_ORACLETEST=${WITH_QT5} \
-DENABLE_UNITY_BUILDS=${ENABLE_UNITY_BUILDS} \
Expand Down
11 changes: 6 additions & 5 deletions .docker/docker-qgis-clangtidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,24 @@ cd ${SRCDIR}
# https://github.com/qgis/QGIS/runs/6733585841?check_suite_focus=true#step:13:89
git config --global --add safe.directory ${SRCDIR}

# The clang-tidy version installed needs to match the one used to compile QGIS.
# Otherwise, it will not be able to inspect the modified files.
echo "::group::Install clang tidy"
apt install -y \
clang-tidy
clang-tidy-15
echo "::endgroup::"

cd ${SRCDIR}

echo "::group::Download clang-tidy-diff"
curl -XGET https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-14.0.6/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -o clang-tidy-diff.py
echo "::endgroup::"
echo "${bold}Disable unity build...${endbold}"
cmake . -B build -DENABLE_UNITY_BUILDS=OFF

echo "${bold}Run clang-tidy on modifications...${endbold}"

# We need to add build/src/test dir as extra include directories because when clang-tidy tries to process qgstest.h
# it has no compile_commands.json instructions to know what are include directories
# It manages to figure out for other headers though, I don't get how...
git diff -U0 HEAD^ | python3 clang-tidy-diff.py -p1 -path=${CTEST_BUILD_DIR} -use-color -extra-arg=-I${CTEST_BUILD_DIR}/src/test/ | tee clang-tidy.log
git diff -U0 HEAD^ | python3 /usr/bin/clang-tidy-diff-15.py -p1 -path=${CTEST_BUILD_DIR} -use-color -extra-arg=-I${CTEST_BUILD_DIR}/src/test/ -clang-tidy-binary /usr/bin/clang-tidy-15 | tee clang-tidy.log

echo -e "\e[1;34mTo reproduce locally:"
echo -e "\e[1;34m - launch cmake with option -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
Expand Down
Loading

0 comments on commit a51c1e8

Please sign in to comment.