Skip to content
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

Configure CMake for clang-tidy separately #4648

Merged
merged 4 commits into from
May 21, 2023

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented May 21, 2023

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 the apt_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 by aqt, 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 the QHash include (SeventvBadges.cpp > SeventvBadges.hpp > Aliases.hpp) and exit with 1. This should be reverted before merging.

Fixes #4403.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

src/providers/seventv/SeventvBadges.cpp Outdated Show resolved Hide resolved
@pajlada pajlada merged commit bd4f6f3 into Chatterino:master May 21, 2023
@Nerixyz Nerixyz deleted the ci/clang-tidy branch May 21, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clang-tidy-review doesn't know about dependencies
2 participants