Skip to content

Commit 53ce6df

Browse files
authored
Unflub clang-tidy (CleverRaven#57450)
1 parent 87a34f7 commit 53ce6df

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ $(ODIR)/%.inc: $(SRC_DIR)/%.cpp
944944

945945
.PHONY: includes
946946
includes: $(OBJS:.o=.inc)
947-
make -C tests includes
947+
+make -C tests includes
948948

949949
$(ODIR)/%.o: $(SRC_DIR)/%.cpp $(PCH_P)
950950
$(CXX) $(CPPFLAGS) $(DEFINES) $(CXXFLAGS) -MMD -MP $(PCHFLAGS) -c $< -o $@

build-scripts/build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,13 @@ then
158158
tidyable_cpp_files=$all_cpp_files
159159
else
160160
make \
161+
-j $num_jobs \
161162
${COMPILER:+COMPILER=$COMPILER} \
162163
TILES=${TILES:-0} \
163164
SOUND=${SOUND:-0} \
164165
includes
165166

166-
./files_changed < ./build-scripts/files_changed
167+
./build-scripts/files_changed > ./files_changed
167168
tidyable_cpp_files="$( \
168169
( build-scripts/get_affected_files.py ./files_changed ) || \
169170
echo unknown )"

build-scripts/clang-tidy.sh

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ then
102102
tidyable_cpp_files=$all_cpp_files
103103
else
104104
make \
105+
-j $num_jobs \
105106
${COMPILER:+COMPILER=$COMPILER} \
106107
TILES=${TILES:-0} \
107108
SOUND=${SOUND:-0} \

build-scripts/files_changed

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ then
4343
fi
4444
done
4545
files_list "$( git merge-base "$base" HEAD^2 )..HEAD^2"
46+
elif [ -n "$GIT_LOCAL_BASE_REF" ]
47+
then
48+
files_list "$GIT_LOCAL_BASE_REF..HEAD"
4649
else
4750
echo 'Neither $TRAVIS nor $GITHUB_BASE_REF was defined' >&2
4851
exit 1

build-scripts/get_affected_files.py

+6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ def parse_includes_file(
3737
set(),
3838
).add(source_file_path)
3939

40+
# A source file also 'includes' itself
41+
self.includes_to_sources.setdefault(
42+
source_file_path,
43+
set(),
44+
).add(source_file_path)
45+
4046
# Parses includes files from a given folder
4147
# Maps include file path to a source file path by converting
4248
# folder_path/*.inc -> file_path_prefix/*.cpp

0 commit comments

Comments
 (0)