Работа с новыми версиями bear и clang-tidy

This commit is contained in:
Andrei Astafev 2022-10-12 15:51:04 +03:00
parent e5d0988040
commit 6aa46cb044

View File

@ -60,7 +60,7 @@ OBJECTS=$(SOURCES:.cpp=.o)
RESULTS=$(SOURCES:.cpp=.txt)
bear:
bear -o compile_commands.json make obj
bear --output compile_commands.json -- make obj
compdb -p . list > compdb.json
mv -f compdb.json compile_commands.json
make res
@ -73,5 +73,9 @@ res: $(RESULTS)
$(CXX) $(CXXFLAGS) -c $< -o /dev/null
%.txt : %.cpp
clang-tidy-12 -quiet $<
if command -v clang-tidy; then clang-tidy -quiet $<; return 0; fi
if command -v clang-tidy-15; then clang-tidy-15 -quiet $<; return 0; fi
if command -v clang-tidy-14; then clang-tidy-14 -quiet $<; return 0; fi
if command -v clang-tidy-13; then clang-tidy-13 -quiet $<; return 0; fi
if command -v clang-tidy-9; then clang-tidy-9 -quiet $<; return 0; fi