Skip to content

Commit

Permalink
Merge branch 'main' into multi-condtion-evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Dec 2, 2023
2 parents 522ea7b + ae27b61 commit c2a1803
Show file tree
Hide file tree
Showing 95 changed files with 1,991 additions and 1,254 deletions.
3 changes: 0 additions & 3 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,14 @@ Checks: >
-portability-std-allocator-const,
-readability-avoid-const-params-in-decls,
-readability-braces-around-statements,
-readability-const-return-type,
-readability-container-data-pointer,
-readability-convert-member-functions-to-static,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-identifier-naming,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-redundant-access-specifiers,
-readability-suspicious-call-argument,
-readability-uppercase-literal-suffix
WarningsAsErrors: '*'
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -480,17 +480,15 @@ jobs:
make -j$(nproc) -s CPPFLAGS="-DCHECK_INTERNAL" CXXFLAGS="-g -O2 -w -DHAVE_BOOST" MATCHCOMPILER=yes VERIFY=1
# TODO: update to Qt6
- name: Generate UI files
- name: CMake
run: |
pushd gui
qmake CONFIG+=debug HAVE_QCHART=yes
make -j$(nproc) compiler_uic_make_all mocables
cmake -S . -B cmake.output -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_MATCHCOMPILER=Verify -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On
- name: Generate triage UI files
- name: Generate dependencies
run: |
pushd tools/triage
qmake CONFIG+=debug
make -j$(nproc) compiler_uic_make_all mocables
# make sure auto-generated GUI files exist
make -C cmake.output autogen
make -C cmake.output gui-build-deps triage-build-ui-deps
- name: Self check
run: |
Expand All @@ -512,9 +510,9 @@ jobs:
./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b1 --addon=naming.json cli lib || ec=1
# check gui with qt settings
mkdir b2
./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b2 -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Igui/temp -Igui gui/*.cpp gui/temp/*.cpp || ec=1
./cppcheck $selfcheck_options $cppcheck_options --cppcheck-build-dir=b2 -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt --addon=naming.json -Icmake.output/gui -Igui gui/*.cpp cmake.output/gui || ec=1
# self check test and tools
./cppcheck $selfcheck_options $cppcheck_options -Icli test/*.cpp tools/*.cpp || ec=1
# triage
./cppcheck $selfcheck_options $cppcheck_options -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt -Itools/triage/temp -Igui tools/triage/*.cpp tools/triage/temp/*.cpp || ec=1
./cppcheck $selfcheck_options $cppcheck_options -DQ_MOC_OUTPUT_REVISION=67 -DQT_CHARTS_LIB --library=qt -Icmake.output/tools/triage -Igui tools/triage/*.cpp cmake.output/tools/triage || ec=1
exit $ec
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
- name: Check
run: |
cppcheckpremium-${{ env.PREMIUM_VERSION }}/premiumaddon --check-loc-license cppcheck.lic > cppcheck-premium-loc
cppcheckpremium-${{ env.PREMIUM_VERSION }}/cppcheck -j$(nproc) -D__GNUC__ -D__CPPCHECK__ --suppressions-list=cppcheckpremium-suppressions --platform=unix64 --enable=style --premium=misra-c++-2008 --premium=cert-c++-2016 --error-exitcode=1 lib
cppcheckpremium-${{ env.PREMIUM_VERSION }}/cppcheck -j$(nproc) -D__GNUC__ -D__CPPCHECK__ --suppressions-list=cppcheckpremium-suppressions --platform=unix64 --enable=style --premium=misra-c++-2008 --premium=cert-c++-2016 --inline-suppr --error-exitcode=1 lib
28 changes: 13 additions & 15 deletions .selfcheck_suppressions
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
missingIncludeSystem
shadowFunction
bitwiseOnBoolean

# temporary suppressions - fix the warnings!
simplifyUsing:lib/valueptr.h
varid0:gui/projectfile.cpp
templateInstantiation
naming-privateMemberVariable:gui/test/cppchecklibrarydata/testcppchecklibrarydata.h
symbolDatabaseWarning:*/moc_*.cpp
simplifyUsing:*/moc_*.cpp

# warnings in Qt generated code we cannot fix
symbolDatabaseWarning:gui/temp/moc_*.cpp
simplifyUsing:gui/temp/moc_*.cpp
funcArgNamesDifferent:gui/temp/moc_*.cpp
symbolDatabaseWarning:tools/triage/temp/moc_*.cpp
naming-varname:gui/temp/ui_*.h
naming-varname:cmake.output/gui/ui_*.h
functionStatic:gui/temp/ui_fileview.h
functionStatic:cmake.output/gui/ui_fileview.h
funcArgNamesDifferent:*/moc_*.cpp
naming-varname:*/ui_*.h
functionStatic:*/ui_fileview.h

# --debug-warnings suppressions
valueFlowBailout
valueFlowBailoutIncompleteVar
autoNoType
bailoutUninitVar

naming-varname:externals/simplecpp/simplecpp.h
naming-privateMemberVariable:externals/simplecpp/simplecpp.h
# TODO: use more granular suppressions - might expose false positives
*:externals/picojson/*
*:externals/tinyxml2/*

# these warnings need to be addressed upstream
uninitMemberVar:externals/tinyxml2/tinyxml2.h
noExplicitConstructor:externals/tinyxml2/tinyxml2.h
missingOverride:externals/tinyxml2/tinyxml2.h
invalidPrintfArgType_sint:externals/tinyxml2/tinyxml2.h
naming-privateMemberVariable:externals/tinyxml2/tinyxml2.h
5 changes: 4 additions & 1 deletion .selfcheck_unused_suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ unusedFunction:gui/codeeditor.*
# usage is disabled
unusedFunction:lib/symboldatabase.cpp
# false positive - #10661
unusedFunction:oss-fuzz/main.cpp
unusedFunction:oss-fuzz/main.cpp

# Q_OBJECT functions which are not called in our code
unusedFunction:cmake.output.notest/gui/cppcheck-gui_autogen/*/moc_aboutdialog.cpp
Loading

0 comments on commit c2a1803

Please sign in to comment.