158 lines
No EOL
4.8 KiB
Text
158 lines
No EOL
4.8 KiB
Text
# 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/*
|
|
|
|
# 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/*
|
|
|
|
# =============================================================================
|
|
# 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
|
|
|
|
# Coroutine missingReturn false positives - awaitable<void> 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_*
|
|
|
|
# =============================================================================
|
|
# 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
|
|
|
|
# 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 |