ci: enable clang-analyzer warnings

This adds the checks in https://neovim.io/doc/reports/clang/ when using
clang-tidy. The strategy is to enable all clang-analyzer checks, and
disable only the checks for the warnings that exist currently. This
allows us to eliminate each warning type without blocking ongoing work,
but also without adding bugs for already eliminated warnings.

The plan is to eventually eliminate https://neovim.io/doc/reports/clang/
by completely integrating it into the clang-tidy check.

Also add make and cmake targets `clang-analyzer` to run this check.
This commit is contained in:
dundargoc
2023-10-06 17:43:23 +02:00
committed by dundargoc
parent 55be4a4e26
commit 6c0f900699
4 changed files with 38 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ functionaltest-lua: | nvim
$(BUILD_TOOL) -C build functionaltest
FORMAT=formatc formatlua format
LINT=lintlua lintsh lintc clang-tidy lintcommit lint
LINT=lintlua lintsh lintc clang-tidy clang-analyzer lintcommit lint
TEST=functionaltest unittest
generated-sources benchmark $(FORMAT) $(LINT) $(TEST) doc: | build/.ran-cmake
$(CMAKE_PRG) --build build --target $@