8000 [libc++] run clang-tidy on src/ in the CI · llvm/llvm-project@3fea1ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 3fea1ac

Browse files
committed
[libc++] run clang-tidy on src/ in the CI
1 parent 1ead155 commit 3fea1ac

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

libcxx/src/.clang-tidy

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
InheritParentConfig: true
22

33
Checks: >
4-
-readability-identifier-naming
4+
-clang-analyzer-*,
5+
6+
-llvm-include-order,
7+
8+
-modernize-loop-convert,
9+
-modernize-use-equals-delete,
10+
-modernize-use-nullptr,
11+
-modernize-use-override,
12+
13+
-readability-identifier-naming,
14+
-readability-function-cognitive-complexity,
15+
-readability-function-size,
16+
-readability-simplify-boolean-expr,
17+
18+
# TODO: Consider enabling clang-analyzer. Without the checks clang-tidy runs 18x faster on my system.

libcxx/test/configs/cmake-bridge.cfg.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ config.recursiveExpansionLimit = 10
2323
config.test_exec_root = os.path.join('@LIBCXX_BINARY_DIR@', 'test')
2424

2525
# Add substitutions for bootstrapping the test suite configuration
26+
config.substitutions.append(('%{bin-dir}', '@LIBCXX_BINARY_DIR@'))
2627
config.substitutions.append(('%{libcxx-dir}', '@LIBCXX_SOURCE_DIR@'))
2728
config.substitutions.append(('%{install-prefix}', '@LIBCXX_TESTING_INSTALL_PREFIX@'))
2829
config.substitutions.append(('%{include-dir}', '@LIBCXX_TESTING_INSTALL_PREFIX@/@LIBCXX_INSTALL_INCLUDE_DIR@'))

libcxx/test/libcxx/clang_tidy.sh.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ===----------------------------------------------------------------------===##
2+
#
3+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
# See https://llvm.org/LICENSE.txt for license information.
5+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
#
7+
# ===----------------------------------------------------------------------===##
8+
9+
# REQUIRES: has-clang-tidy
10+
11+
# RUN: %{python} %{libcxx-dir}/../clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -clang-tidy-binary %{clang-tidy} -warnings-as-errors \* -source-filter=".*libcxx/src.*" -quiet -p %{bin-dir}/..

libcxx/utils/ci/run-buildbot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ function generate-cmake() {
144144
generate-cmake-base \
145145
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
146146
-DLIBCXX_CXX_ABI=libcxxabi \
147+
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \
147148
"${@}"
148149
}
149150

0 commit comments

Comments
 (0)
0