mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-27 06:53:11 +08:00
Leak fixes (13 sources, 1.4MB → 0 bytes): - Cypher: free col_names after rb_set_columns, free rejected inline prop nodes, store WITH aliases in qualified_name for auto-cleanup - Store: add cbm_project_free_fields, fix find_node_ids_by_qns leak - Graph buffer: free strdup'd hash keys during delete operations - SQL scanner: free old start_tag before reassignment in deserialize Platform independence: - Vendor sqlite3 amalgamation (3.49.1) — eliminates system libsqlite3 dependency, enables full ASan/LeakSanitizer instrumentation - Add -I for vendored tree-sitter unicode headers — eliminates hidden dependency on system libicu-dev - Add test-infrastructure/ with Docker Compose for local GCC+ASan testing that mirrors CI exactly
33 lines
1.3 KiB
Docker
33 lines
1.3 KiB
Docker
# Lint environment — mirrors CI lint job exactly:
|
|
# - clang-format-20 (from LLVM apt repo)
|
|
# - cppcheck 2.20.0 (built from source, same as CI)
|
|
#
|
|
# Build: docker build -t cbm-lint -f test-infrastructure/Dockerfile.lint test-infrastructure/
|
|
# Run: docker run --rm -v $(pwd):/src cbm-lint
|
|
|
|
FROM ubuntu:noble
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc g++ make cmake \
|
|
libsqlite3-dev zlib1g-dev \
|
|
pkg-config wget gnupg git ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# clang-format-20 (same version as CI)
|
|
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
|
|
&& echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" > /etc/apt/sources.list.d/llvm-20.list \
|
|
&& apt-get update && apt-get install -y --no-install-recommends clang-format-20 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# cppcheck 2.20.0 (same version as CI)
|
|
RUN git clone --depth 1 --branch 2.20.0 https://github.com/danmar/cppcheck.git /tmp/cppcheck \
|
|
&& cmake -S /tmp/cppcheck -B /tmp/cppcheck/build -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=OFF -DCMAKE_INSTALL_PREFIX=/usr/local \
|
|
&& cmake --build /tmp/cppcheck/build -j$(nproc) \
|
|
&& cmake --install /tmp/cppcheck/build \
|
|
&& rm -rf /tmp/cppcheck
|
|
|
|
WORKDIR /src
|
|
|
|
ENTRYPOINT ["scripts/lint.sh"]
|
|
CMD ["CLANG_FORMAT=clang-format-20"]
|