Skip to content

Commit

Permalink
update for clang-tidy
Browse files Browse the repository at this point in the history
Use `clang` compiler instead of `gcc`.
Remove ansi color from `run-clang-tidy` result.

Signed-off-by: Inho Oh <[email protected]>
  • Loading branch information
webispy committed Nov 2, 2023
1 parent 8ae9848 commit e0ea508
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ RUN apt-get update \
&& apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
automake \
clang-format clang-tidy clang-tools \
clang clang-format clang-tidy clang-tools \
colorized-logs \
cppcheck \
debianutils \
debhelper \
Expand All @@ -24,7 +25,7 @@ RUN apt-get update \
gstreamer1.0-pulseaudio \
iputils-ping \
jq \
rapidjson-dev \
rapidjson-dev \
less \
libnugu-epd-dbg \
libnugu-kwd-dbg \
Expand Down
6 changes: 3 additions & 3 deletions run_codereview.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

mkdir -p temp_build
cd temp_build
Expand All @@ -7,10 +7,10 @@ CLANG_RESULT_FILE="result.log"
CHECKER_REPORT_FILE="report.json"

echo "step-1. generate compile_commands.json"
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../ > /dev/null
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../ > /dev/null

echo "step-2. run clang-tidy tools"
run-clang-tidy -checks='-*,clang*,perf*,cert*' > $CLANG_RESULT_FILE
run-clang-tidy -checks='-*,clang*,perf*,cert*' | tee >(ansi2txt > $CLANG_RESULT_FILE)

echo "step-3. run code checker"
set -e
Expand Down

0 comments on commit e0ea508

Please sign in to comment.