From 6aa46cb044902a49e555c5d8eee66960e2ca45bd Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 12 Oct 2022 15:51:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D1=81?= =?UTF-8?q?=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=BC=D0=B8=20=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D1=81=D0=B8=D1=8F=D0=BC=D0=B8=20bear=20=D0=B8=20clang-tidy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0da6075..4ffe02c 100644 --- a/Makefile +++ b/Makefile @@ -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