mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 20:55:44 +00:00
30 lines
849 B
Bash
Executable File
30 lines
849 B
Bash
Executable File
#!/bin/bash
|
|
# Runs the curated Shardok clang-tidy gate used by CI.
|
|
#
|
|
# This intentionally checks representative files instead of the whole C++ tree.
|
|
# Keep this list low-noise; expand it as cleanup PRs make more areas tidy-clean.
|
|
|
|
set -euo pipefail
|
|
|
|
repo_root="$(git rev-parse --show-toplevel)"
|
|
source "$repo_root/scripts/shardok_cpp_config.sh"
|
|
|
|
files=(
|
|
"src/main/cpp/net/eagle0/shardok/library/ActionCost.hpp"
|
|
"src/main/cpp/net/eagle0/shardok/library/CombatDamage.hpp"
|
|
)
|
|
|
|
compiler_args=(
|
|
"-I$repo_root"
|
|
"$SHARDOK_CXX_STANDARD_ARG"
|
|
)
|
|
|
|
if command -v xcrun >/dev/null 2>&1; then
|
|
sdk_path="$(xcrun --show-sdk-path)"
|
|
compiler_args+=("-isysroot" "$sdk_path")
|
|
fi
|
|
|
|
"$repo_root/scripts/run-clang-tidy.sh" --verify-config
|
|
|
|
"$repo_root/scripts/run-clang-tidy.sh" --quiet --warnings-as-errors="*" "${files[@]}" -- "${compiler_args[@]}"
|