mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
clang-tidy CI integration
This commit is contained in:
8
.clang-tidy
Normal file
8
.clang-tidy
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
Checks: >
|
||||
*-,
|
||||
cppcoreguidelines-macro-usage,
|
||||
modernize-use-nullptr,
|
||||
modernize-use-override
|
||||
WarningsAsErrors: true
|
||||
FormatStyle: 'file'
|
||||
32
.github/workflows/clang-tidy.yml
vendored
Normal file
32
.github/workflows/clang-tidy.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: clang-tidy-check
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.editorconfig'
|
||||
- '.gitattributes'
|
||||
- '.github/*_TEMPLATE/**'
|
||||
- '.github/workflows/localisation.yml'
|
||||
- '.gitignore'
|
||||
- '.vscode/**'
|
||||
|
||||
jobs:
|
||||
clang-tidy-check:
|
||||
runs-on: ubuntu-latest
|
||||
container: openrct2/openrct2-build:12-jammy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1
|
||||
with:
|
||||
key: linux-clang
|
||||
- name: Setup CCache environment
|
||||
run: |
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
- name: Get clang-tidy
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y clang-tidy
|
||||
- uses: ZehMatt/clang-tidy-annotations@v1
|
||||
with:
|
||||
build_dir: 'build'
|
||||
cmake_args: '-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DDISABLE_DISCORD_RPC=ON'
|
||||
Reference in New Issue
Block a user