Configure CMake for clang-tidy
separately
#4648
Merged
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.
Description
Since the
clang-tidy-review
action runs in Docker, it doesn't have access to all the dependencies outside the container. Packages needed to build can be specified using theapt_packages
input.Currently, the
build
folder from the regular build is reused inside the action. This has some conflicts relating to paths changing.This PR addresses both points by specifying
apt_packages
and (re-)configuring CMake in a different directory. Unfortunately, it doesn't use the Qt version installed byaqt
, but uses the system's Qt. This shouldn't be much of an issue since the system's Qt is 5.15.3, thus in the supported range.As a proof, I edited one file to trigger a lint. Without this PR,
clang-tidy
would fail on theQHash
include (SeventvBadges.cpp
>SeventvBadges.hpp
>Aliases.hpp
) and exit with1
. This should be reverted before merging.Fixes #4403.