mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 20:55:44 +00:00
Add Shardok clang-tidy CI gate (#8189)
This commit is contained in:
+10
-18
@@ -2,25 +2,17 @@ Checks: >
|
|||||||
-*,
|
-*,
|
||||||
bugprone-*,
|
bugprone-*,
|
||||||
performance-*,
|
performance-*,
|
||||||
readability-*,
|
modernize-use-nullptr,
|
||||||
modernize-*,
|
modernize-use-override,
|
||||||
cppcoreguidelines-*,
|
modernize-use-auto,
|
||||||
|
modernize-use-nodiscard,
|
||||||
|
readability-braces-around-statements,
|
||||||
|
readability-qualified-auto,
|
||||||
|
readability-redundant-member-init,
|
||||||
|
cppcoreguidelines-pro-type-cstyle-cast,
|
||||||
-bugprone-easily-swappable-parameters,
|
-bugprone-easily-swappable-parameters,
|
||||||
-cppcoreguidelines-avoid-magic-numbers,
|
-bugprone-branch-clone,
|
||||||
-cppcoreguidelines-macro-usage,
|
-bugprone-signed-char-misuse
|
||||||
-cppcoreguidelines-owning-memory,
|
|
||||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
|
||||||
-cppcoreguidelines-pro-bounds-constant-array-index,
|
|
||||||
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
|
|
||||||
-cppcoreguidelines-pro-type-const-cast,
|
|
||||||
-cppcoreguidelines-pro-type-reinterpret-cast,
|
|
||||||
-cppcoreguidelines-pro-type-union-access,
|
|
||||||
-cppcoreguidelines-pro-type-vararg,
|
|
||||||
-modernize-use-trailing-return-type,
|
|
||||||
-readability-convert-member-functions-to-static,
|
|
||||||
-readability-function-cognitive-complexity,
|
|
||||||
-readability-identifier-length,
|
|
||||||
-readability-magic-numbers
|
|
||||||
WarningsAsErrors: ''
|
WarningsAsErrors: ''
|
||||||
HeaderFilterRegex: 'src/(main|test)/cpp/net/eagle0/(shardok|common)/.*'
|
HeaderFilterRegex: 'src/(main|test)/cpp/net/eagle0/(shardok|common)/.*'
|
||||||
FormatStyle: file
|
FormatStyle: file
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ on:
|
|||||||
- '.bazelrc'
|
- '.bazelrc'
|
||||||
- 'ci/github_actions/ensure_bazel_installed.sh'
|
- 'ci/github_actions/ensure_bazel_installed.sh'
|
||||||
- 'ci/github_actions/summarize_bazel_bep.py'
|
- 'ci/github_actions/summarize_bazel_bep.py'
|
||||||
|
- '.clang-tidy'
|
||||||
|
- 'scripts/run-clang-tidy.sh'
|
||||||
|
- 'scripts/check_shardok_clang_tidy.sh'
|
||||||
- '.github/actions/setup-bazel/**'
|
- '.github/actions/setup-bazel/**'
|
||||||
- '.github/workflows/bazel_test.yml'
|
- '.github/workflows/bazel_test.yml'
|
||||||
- '!src/main/csharp/**'
|
- '!src/main/csharp/**'
|
||||||
@@ -26,6 +29,9 @@ on:
|
|||||||
- '.bazelrc'
|
- '.bazelrc'
|
||||||
- 'ci/github_actions/ensure_bazel_installed.sh'
|
- 'ci/github_actions/ensure_bazel_installed.sh'
|
||||||
- 'ci/github_actions/summarize_bazel_bep.py'
|
- 'ci/github_actions/summarize_bazel_bep.py'
|
||||||
|
- '.clang-tidy'
|
||||||
|
- 'scripts/run-clang-tidy.sh'
|
||||||
|
- 'scripts/check_shardok_clang_tidy.sh'
|
||||||
- '.github/actions/setup-bazel/**'
|
- '.github/actions/setup-bazel/**'
|
||||||
- '.github/workflows/bazel_test.yml'
|
- '.github/workflows/bazel_test.yml'
|
||||||
- '!src/main/csharp/**'
|
- '!src/main/csharp/**'
|
||||||
@@ -78,6 +84,8 @@ jobs:
|
|||||||
node-version: 'lts/*'
|
node-version: 'lts/*'
|
||||||
- name: Check JavaScript syntax
|
- name: Check JavaScript syntax
|
||||||
run: node --check src/main/go/net/eagle0/admin_server/static/map_editor.js
|
run: node --check src/main/go/net/eagle0/admin_server/static/map_editor.js
|
||||||
|
- name: Check Shardok clang-tidy gate
|
||||||
|
run: ./scripts/check_shardok_clang_tidy.sh
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: [self-hosted, bazel]
|
runs-on: [self-hosted, bazel]
|
||||||
|
|||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/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)"
|
||||||
|
|
||||||
|
files=(
|
||||||
|
"src/main/cpp/net/eagle0/shardok/library/ActionCost.hpp"
|
||||||
|
"src/main/cpp/net/eagle0/shardok/library/CombatDamage.hpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
"$repo_root/scripts/run-clang-tidy.sh" --verify-config
|
||||||
|
|
||||||
|
"$repo_root/scripts/run-clang-tidy.sh" --quiet --warnings-as-errors="*" "${files[@]}" -- -I"$repo_root" -std=c++23
|
||||||
Reference in New Issue
Block a user