mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-15 08:26:04 +08:00
* Print test names at test time (#1343) * Fix operator| conflict with std::ranges (#1395) * Add test/run-clang-tidy.sh Also, add .clang-tidy configuration file. In test/syntax_check/CMakeLists.txt, make ETL headers non-system headers. Added .github/workflow/clang-tidy.yaml. Does not break the build for now on clang-tidy findings/warnings. Fix syntax issues Those issues were uncovered by making ETL headers non-system headers in test/syntax_checks/CMakeLists.txt * Fix macro syntax --------- Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com> Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
30 lines
755 B
Bash
Executable File
30 lines
755 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Execute from project root directory
|
|
#
|
|
|
|
set -euo pipefail
|
|
|
|
if [[ ! -f CMakeLists.txt || ! -d .git ]]; then
|
|
echo "Error: must be run from the project root directory" >&2
|
|
exit 1
|
|
fi
|
|
|
|
export CMAKE_EXPORT_COMPILE_COMMANDS=ON
|
|
CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
|
|
export CMAKE_BUILD_PARALLEL_LEVEL
|
|
|
|
cd test/syntax_check
|
|
rm -rf build-clang-tidy
|
|
mkdir -p build-clang-tidy
|
|
cd build-clang-tidy
|
|
|
|
CC=clang CXX=clang++ cmake -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF \
|
|
-DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_CXX_STANDARD=17 ..
|
|
cmake --build .
|
|
|
|
cd ../../..
|
|
|
|
run-clang-tidy -j "$(nproc)" -p test/syntax_check/build-clang-tidy
|
|
# TODO: Add -warnings-as-errors='*' once the code is clean of warnings.
|