mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added more clang-tidy checks
Improved GitHub Action to run clang-format as part of clang-tidy * Simplify clang-tidy workflow * Added modernize-use-using, modernize-redundant-void-arg, readability-static-accessed-through-instance * Add nolint for libecl typedefs
This commit is contained in:
27
.github/workflows/clang-tidy.yml
vendored
27
.github/workflows/clang-tidy.yml
vendored
@@ -1,6 +1,9 @@
|
||||
name: clang-tidy
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.clang-tidy'
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Once every night
|
||||
@@ -34,6 +37,7 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update --option="APT::Acquire::Retries=3"
|
||||
sudo apt-get install --option="APT::Acquire::Retries=3" libxkbcommon-x11-0 libgl1-mesa-dev mesa-common-dev libglfw3-dev libglu1-mesa-dev libhdf5-dev
|
||||
sudo apt-get install clang-tidy-15 clang-format-15
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
@@ -56,29 +60,16 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }} -DRESINSIGHT_USE_OPENMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
|
||||
sudo apt-get install clang-tidy-15
|
||||
mv compile_commands.json compile_commands_original.json
|
||||
python ../scripts/fix_json_database.py compile_commands_original.json >> compile_commands.json
|
||||
- name: clang-tidy on ApplicationLibCode/Application
|
||||
- name: Run clang-tidy and apply fixes, clang-format after fixes
|
||||
run: |
|
||||
cd build
|
||||
run-clang-tidy-15 -fix files ApplicationLibCode/Application
|
||||
- name: clang-tidy on ApplicationLibCode/ProjectDataModel
|
||||
run-clang-tidy-15 -fix files ApplicationLibCode/Application ApplicationLibCode/ProjectDataModel ApplicationLibCode/ReservoirDataModel ApplicationLibCode/Commands ApplicationLibCode/GeoMech
|
||||
- name: Run clang-format after clang-tidy
|
||||
run: |
|
||||
cd build
|
||||
run-clang-tidy-15 -fix files ApplicationLibCode/ProjectDataModel
|
||||
- name: clang-tidy on ApplicationLibCode/ReservoirDataModel
|
||||
run: |
|
||||
cd build
|
||||
run-clang-tidy-15 -fix files ApplicationLibCode/ReservoirDataModel
|
||||
- name: clang-tidy on ApplicationLibCode/Commands
|
||||
run: |
|
||||
cd build
|
||||
run-clang-tidy-15 -fix files ApplicationLibCode/Commands
|
||||
- name: clang-tidy on ApplicationLibCode/GeoMech
|
||||
run: |
|
||||
cd build
|
||||
run-clang-tidy-15 -fix files ApplicationLibCode/GeoMech
|
||||
cd build/ApplicationLibCode
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -i
|
||||
- name: Remove Qt before creating PR
|
||||
run: |
|
||||
rm -rf Qt
|
||||
|
||||
Reference in New Issue
Block a user