-
Notifications
You must be signed in to change notification settings - Fork 4
Add clangd tidy checks #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
97gamjak
wants to merge
49
commits into
dev
Choose a base branch
from
add_clangd-tidy_checks
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
8db7159
ci: add first version clangd-tidy checks
97gamjak 82bfc6f
cleanup: remove unused header
97gamjak 976653b
cleanup: export intrinsic headers in linearAlgebra lib
97gamjak 79d124f
Merge remote-tracking branch 'origin/dev' into add_clangd-tidy_checks
97gamjak 054157a
cleanup: final call on dstr is prohibited -- make full class final
97gamjak 2443255
cleanup: wrap Kokkos-related code in conditional compilation directives
97gamjak dc5805a
cleanup: another kokkos PP cleanup
97gamjak 41be66f
cleanup: remove some unused headers
97gamjak f05d588
Merge remote-tracking branch 'origin/dev' into add_clangd-tidy_checks
97gamjak e3f4d53
cleanup: guard mpi approach with correct PP directive
97gamjak c69bffe
cleanup: remove some more unused headers
97gamjak 37f9a5c
cleanup: comment out unused function params
97gamjak ac4e188
cleanup: guard kokkos impl files with correct PP directive
97gamjak 4b8f56b
fix: remove error flags when compiling with benchmarking
97gamjak 9c4eef8
cleanup: guard selection impl file with PP guards
97gamjak 08b66d2
cleanup: more kokkos PP guards
97gamjak 1f4d9af
cleanup: fix reusing same variable twice
97gamjak f184178
Merge remote-tracking branch 'origin/dev' into add_clangd-tidy_checks
97gamjak fa504ee
cleanup: more kokkos PP directives
97gamjak 76a4022
cleanup: remove unused header
97gamjak eaa92e0
cleanup: remove this argument from lambdas as it is not used
97gamjak 17ce6db
cleanup: add explicit destructor for private unique ptr
97gamjak 577a990
cleanup: more kokkos PP
97gamjak e3aae94
fix: add missing cmake dependency to benchmark lib
97gamjak 716e70b
cleanup: correct include paths according to cmake approach
97gamjak d5939b0
Merge remote-tracking branch 'origin/dev' into add_clangd-tidy_checks
97gamjak 5f4c874
cleanup: remove unused step param
97gamjak 5b6eada
cleanup: remove unused includes
97gamjak 107e27a
fix: add missing step in rst file for rpmd
97gamjak d0b594c
fix: make check of typeid in tests for engine safer
97gamjak cb79f6a
chore: fix some rework bugs
97gamjak 7d4ba9e
chore: cmake fix after rework
97gamjak cf68a0f
cleanup: use bindMember in tests also
97gamjak 6fbb7ed
cleanup: remove unused param for rpmd rst output
97gamjak ccfee3d
cleanup: remove unused header
97gamjak 8c905db
cleanup: silence unused result warning
97gamjak ed0d3a5
chore: fix header in tests to be compliant with cmake approach
97gamjak 3cbfd30
cleanup: generalize engine type check
97gamjak bef34c5
cleanup: remove unused headers
97gamjak c8f8d89
cleanup: add type checking approach in tests also for potential types
97gamjak 319b354
cleanup: generalize template approach for type checking
97gamjak a2c997d
chore: some more cleanups and header removals
97gamjak 4307a6c
Merge remote-tracking branch 'origin/dev' into add_clangd-tidy_checks
97gamjak 9dea215
cleanup: finish implementing first version of clangd and clang_tidy c…
97gamjak 4c04e9c
chore: add changelog update
97gamjak 9d6fa6d
chore: add numpy to lint ci
97gamjak 5d858ef
chore: add same on settings as for build workflow
97gamjak 6eb4d8b
chore: fix problems in lint.yml ci
97gamjak 8fffe7b
chore: remove some more kokkos include via PP directive
97gamjak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| name: LINT | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - '*' | ||
| paths: | ||
| - '.github/workflows/ci_build.yml' | ||
| - '.cmake/**' | ||
| - 'apps/**' | ||
| - 'include/**' | ||
| - 'src/**' | ||
| - 'integration_tests/**' | ||
| - 'tests/**' | ||
| - 'benchmarks/CMakeLists.txt' | ||
| - 'benchmarks/src/**' | ||
| - 'CMakeLists.txt' | ||
| - '.clang-tidy' | ||
| - 'scripts/clang_tidy.sh' | ||
| - '.github/workflows/lint.yml' | ||
| push: | ||
| branches: | ||
| - dev | ||
| - main | ||
| paths: | ||
| - '.github/workflows/ci_build.yml' | ||
| - '.cmake/**' | ||
| - 'apps/**' | ||
| - 'include/**' | ||
| - 'src/**' | ||
| - 'integration_tests/**' | ||
| - 'CMakeLists.txt' | ||
| - '.clang-tidy' | ||
| - 'scripts/clang_tidy.sh' | ||
| - '.github/workflows/lint.yml' | ||
| - 'benchmarks/src/**' | ||
| - 'CMakeLists.txt' | ||
| workflow_dispatch: | ||
|
97gamjak marked this conversation as resolved.
|
||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-24.04 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install build tools | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install -y gcc-13 g++-13 mold ninja-build clangd-20 | ||
| sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-20 100 | ||
| shell: bash | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: install python dependencies | ||
| run: | | ||
| python -m pip install numpy | ||
| shell: bash | ||
|
|
||
| - name: Install clangd-tidy | ||
| run: python -m pip install clangd-tidy | ||
| shell: bash | ||
|
|
||
| - name: Configure (generate compile_commands.json) | ||
| run: | | ||
| cmake -S . -B build -G Ninja \ | ||
| -DCMAKE_BUILD_TYPE=Debug \ | ||
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
| -DBUILD_WITH_NATIVE=Off | ||
| env: | ||
| CC: gcc-13 | ||
| CXX: g++-13 | ||
|
|
||
| - name: Run clangd-tidy | ||
| run: | | ||
| clangd-tidy $(find src/ apps/ include/ -name "*.cpp" -o -name "*.hpp" -o -name "*.tpp" 2>/dev/null) -p=build | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "clangd-tidy (changed)", | ||
| "type": "shell", | ||
| "command": "bash", | ||
| "args": [ | ||
| "-c", | ||
| "scripts/clang_tidy.sh" | ||
| ], | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| }, | ||
| "problemMatcher": [ | ||
| { | ||
| "owner": "clangd-tidy", | ||
| "fileLocation": [ | ||
| "absolute" | ||
| ], | ||
| "pattern": { | ||
| "regexp": "^(.*?):(\\d+):(\\d+):\\s*(warning|error|note):\\s*(.*)$", | ||
| "file": 1, | ||
| "line": 2, | ||
| "column": 3, | ||
| "severity": 4, | ||
| "message": 5 | ||
| } | ||
| } | ||
| ], | ||
| "group": "build" | ||
| }, | ||
| { | ||
| "label": "clangd-tidy (all)", | ||
| "type": "shell", | ||
| "command": "bash", | ||
| "args": [ | ||
| "-c", | ||
| "scripts/clang_tidy.sh --all" | ||
| ], | ||
| "options": { | ||
| "cwd": "${workspaceFolder}" | ||
| }, | ||
| "problemMatcher": [ | ||
| { | ||
| "owner": "clangd-tidy", | ||
| "fileLocation": [ | ||
| "absolute" | ||
| ], | ||
| "pattern": { | ||
| "regexp": "^(.*?):(\\d+):(\\d+):\\s*(warning|error|note):\\s*(.*)$", | ||
| "file": 1, | ||
| "line": 2, | ||
| "column": 3, | ||
| "severity": 4, | ||
| "message": 5 | ||
| } | ||
| } | ||
| ], | ||
| "group": "build" | ||
| }, | ||
| { | ||
| "type": "cmake", | ||
| "label": "CMake: build", | ||
| "command": "build", | ||
| "targets": [ | ||
| "all" | ||
| ], | ||
| "group": "build", | ||
| "problemMatcher": [], | ||
| "detail": "CMake template build task" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.