# YAMS cppcheck suppressions # This file contains suppressions for false positives and intentional code patterns # ============================================================================= # Third-party and generated code suppressions # ============================================================================= # Suppress all issues in third-party dependencies fetched via CMake *:*/_deps/* *:*/build/* *:*/cmake-build-*/* *:*/.cache/* *:*/third_party/* *:*/external/* *:*/vendor/* *:*/.conan2/* # Generated protobuf files *:*.pb.h *:*.pb.cc # SQLite amalgamation file - external code *:*/sqlite3.c *:*/sqlite3.h # PDFium headers - external binary distribution *:*/pdfium/* # LZMA SDK - external C code *:*/lzma-src/* # ONNX Runtime headers *:*/onnxruntime/* # Example plugins with special characters *:*/examples/plugins/* # ============================================================================= # Public DTOs / API structs # ============================================================================= # Many header-only DTO structs are populated/consumed across TUs (serialization, # DB mapping, IPC, etc.). cppcheck reports unusedStructMember within a single TU. unusedStructMember:*include/yams/api/* unusedStructMember:*include/yams/core/types.h unusedStructMember:*include/yams/metadata/* unusedStructMember:*include/yams/vector/* unusedStructMember:*include/yams/content/*_content_handler.h unusedStructMember:*include/yams/daemon/resource/* unusedStructMember:*include/yams/daemon/components/ServiceManager.h # Various headers intentionally include private impl/rolling-window state. unusedStructMember:*include/yams/chunking/chunker.h # ============================================================================= # C++20/23 feature false positives # ============================================================================= # cppcheck doesn't fully support C++20/23 features like coroutines, concepts, # ranges, etc. These produce syntaxError and other false positives. # Coroutine-related false positives (co_await, co_return, co_yield) syntaxError:*daemon_client.h syntaxError:*request_handler.h syntaxError:*request_handler.cpp syntaxError:*streaming_processor.cpp syntaxError:*InternalEventBus.h syntaxError:*plugin_host_services.cpp # C++20 concepts (requires clauses) syntaxError:*atomic_utils.h # C++20 ranges and other features syntaxError:*ui_helpers.hpp syntaxError:*repair_manager.h syntaxError:*mcp_server.cpp # nlohmann::json-heavy test inputs with "$prev" expressions trip cppcheck's parser. syntaxError:*mcp_code_mode_catch2_test.cpp # __has_feature() is a Clang compiler built-in; cppcheck cannot evaluate it syntaxError:*onnx_plugin_harness_test.cpp # Coroutine missingReturn false positives - awaitable functions don't need # explicit co_return at end of function missingReturn:*search_service.cpp # unknownMacro false positives for standard types unknownMacro:*content_store_builder.h # ============================================================================= # Specific unused function suppressions # ============================================================================= # Test-related functions unusedFunction:*Mock* unusedFunction:*Test* unusedFunction:*Fixture* # Factory and registry patterns unusedFunction:*Factory* unusedFunction:*Provider* unusedFunction:*Handler* unusedFunction:*Processor* # CLI command registration unusedFunction:*Command* # Configuration and initialization unusedFunction:*Init* unusedFunction:*Config* unusedFunction:*Settings* # RAII and resource management unusedFunction:*Guard* unusedFunction:*Lock* unusedFunction:*Scope* # API interfaces unusedFunction:*Interface* unusedFunction:*Abstract* # Error handling patterns unusedFunction:*Result* unusedFunction:*Expected* unusedFunction:*Optional* unusedFunction:*Cleanup* # ============================================================================= # Other common suppressions # ============================================================================= # Intentionally unused variables unusedVariable:*unused* unusedVariable:*_unused* # Template and inheritance patterns missingOverride noExplicitConstructor templateInstantiation useInitializationList # Duplicate expressions in specialized code duplicateExpression:*vector* duplicateExpression:*embedding* duplicateExpression:*compression* duplicateExpression:*crypto* duplicateExpression:*hash* duplicateExpression:*sql* duplicateExpression:*query* # Performance-critical code where style is less important constParameter:*hot_path* constParameter:*performance* constParameter:*fast_* # Result rendering: FilePathAdapter deliberately reports size=0. knownConditionTrueFalse:*include/yams/cli/result_renderer.h # Generated / schema-like code: avoid refactoring-only suggestions. functionStatic:*include/yams/daemon/ipc/ipc_protocol.h # Refactor-only suggestions we don't want to chase in normal workflow. useStlAlgorithm functionStatic # ============================================================================= # Cppcheck false positives for control flow patterns # ============================================================================= # cppcheck doesn't understand that co_return/return exits the function, so it # reports false nullPointerRedundantCheck after early-exit guards like: # if (!ptr) { co_return Error{}; } # ptr->method(); // cppcheck thinks ptr could be null here nullPointerRedundantCheck:*daemon_client.cpp nullPointerRedundantCheck:*request_dispatcher_status.cpp nullPointerRedundantCheck:*dispatch_utils.hpp nullPointerRedundantCheck:*ServiceManager.cpp nullPointerRedundantCheck:*SocketServer.cpp nullPointerRedundantCheck:*status_command.cpp nullPointerRedundantCheck:*request_dispatcher_documents.cpp nullPointerRedundantCheck:*request_dispatcher_embeddings.cpp nullPointerRedundantCheck:*request_dispatcher_graph.cpp nullPointerRedundantCheck:*request_dispatcher_plugins.cpp nullPointerRedundantCheck:*IngestService.cpp nullPointerRedundantCheck:*mcp_server.cpp nullPointerRedundantCheck:*session_command.cpp nullPointer:*dispatch_utils.hpp # Result-returning retry loops can confuse cppcheck's control-flow model. identicalConditionAfterEarlyExit:*metadata_repository.cpp # Third-party dependency parser noise from Conan-managed headers. missingInclude:*\.conan2/* preprocessorErrorDirective:*\.conan2/* # Test/helper relative includes that compile correctly but cppcheck project mode # fails to resolve consistently. missingInclude:*tests/integration/vector/hnsw_retrieval_diagnostic.cpp missingInclude:*tests/integration/search/hybrid_search_integration_test.cpp missingInclude:*tests/integration/search/fsm_tuning_benchmark_integration_test.cpp missingInclude:*tests/unit/metadata/repository_foundation_test.cpp missingInclude:*tests/unit/plugins/plugin_installer_test.cpp # Iterator validity after early-exit derefInvalidIteratorRedundantCheck:*request_handler.cpp # False positive: cppcheck doesn't understand try/catch control flow with coroutines accessMoved:*streaming_processor.cpp