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

C++: Silence alerts coming from CMake test compilation files #18408

Merged
merged 4 commits into from
Jan 9, 2025

Conversation

jketema
Copy link
Contributor

@jketema jketema commented Jan 6, 2025

This silences alert wobble, as the suffix of CMake TryCompile- directories is random and changes each time a project is built.

There's probably other queries where this makes sense, but for now I've limited myself to queries for which I concretely observed TryCompile- files showing up.

DCA nightly shows that the neovim alerts on TryCompile- files disappears, and similarly for DCA autobuild posix and .NET diagnostics.

Pull Request checklist

All query authors

Internal query authors only

  • Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
  • Changes are validated at scale (internal access required).
  • Adding a new query? Consider also adding the query to autofix.

@github-actions github-actions bot added the C++ label Jan 6, 2025
@jketema jketema marked this pull request as ready for review January 7, 2025 13:25
@jketema jketema requested a review from a team as a code owner January 7, 2025 13:25
redsun82
redsun82 previously approved these changes Jan 8, 2025
Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

Sounds good to me!

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

Couple of tiny points, otherwise LGTM.

parent.getParentContainer().getBaseName() = "CMakeFiles"
)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to worry about files in subdirectories of the TryCompile-* directory? i.e. CMakeFiles/CMAkeScratch/TryCompile-foo/bar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. My understanding is that CMake creates each directory on-the-fly and only uses it for one test compilation.

…ct/CMakeFiles/CMakeScratch/TryCompile-abcdef/CheckFunctionExists.c

Co-authored-by: Jeroen Ketema <[email protected]>
@jketema jketema merged commit 12048ae into github:main Jan 9, 2025
15 checks passed
@jketema jketema deleted the config-silence branch January 9, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants