clang-tidy Questions
2
Please help me to understand how can I comment out a single line from a clang-tidy configuration file.
Bautista asked 4/3, 2021 at 9:13
2
Solved
I am trying to understand this clang-tidy warning: altera-id-dependent-backward-branch that seems to be triggered by this loop.
for(; first != current; ++first)
The example I have is this code, t...
Slouch asked 17/12, 2021 at 9:27
3
Solved
Right now I have a .clang-tidy file that includes a large list of checks and they all go in one line like this:
Checks: '-*,bugprone-*,-bugprone-narrowing-conversions, cert-*, -cert-err58-cpp, cla...
Manipular asked 17/3, 2020 at 13:3
3
Solved
How do you install clang-tidy on macOS?
It seems quite easy to install clang-format (using brew) on macOS, but it it seems much harder to install clang-tidy without install and building all of cla...
Gosh asked 2/11, 2018 at 0:9
1
Solved
I hope to match all for-loop with vector declaring in it's body (might extend to while-loop and do-while-loop later):
#include <vector>
int main() {
for (int i = 0; i < 10; i++) {
std::...
Cloy asked 9/1, 2024 at 7:34
3
I am using clang-tidy as a "linter" tool in development. I started to integrate 3rd party software into my code and when I include their header files using:
-I/path/to/include
tons of errors ar...
Zestful asked 15/5, 2018 at 17:16
4
The goal here to help people catch some bugs on their embedded systems when developing with C++. As part of this I'm trying to get clang-tidy to work for small embedded targets.
I'm trying setup C...
Demetriusdemeyer asked 9/9, 2019 at 9:52
1
I am using clang-tidy to lint my code base, but the entire process is very slow. Is there a way to completely ignore header files and not only suppress the warnings? As you can see with this exampl...
Heddle asked 5/7, 2022 at 2:43
1
I'm attempting to move the hardcoded config option of clang-tidy from our Makefile to a .clang-tidy YAML file. As of now, we call run-clang-tidy-6.0.py as such:
# Run clang-tidy. The header filter ...
Naresh asked 18/10, 2019 at 0:48
1
I have a function that gets a "Config" struct, which at the moment is simply a struct that contains an array
class ShmConfig {
public:
std::int64_t shellShmSize[ShellId_Count];
};
And I...
Saveloy asked 18/5, 2021 at 11:50
3
Solved
I'm trying to integrate clang-tidy with cmake, but there are some files that belong to a particular target which I would like to ignore.
Is there any way to make clang-tidy to ignore files under c...
Statuette asked 18/5, 2020 at 10:33
2
Solved
I'm trying to set up clang-tidy for a project. I'd like to be able to have clean output, and encourage the use of -fix mode where possible. However, there are individual cases where an exception is...
Ourself asked 21/6, 2016 at 17:1
2
Solved
With clang-tidy static analyzer I can keep a file (.clang-tidy) in the root of the project with the warnings I want to activate or deactivate.
clang-tidy will look for this file (as far I know) and...
Kuban asked 21/9, 2021 at 16:0
3
Solved
I want to use the default configuration of enabled/disabled checks from CLion (with some small changes) and I want to enforce it when building my application.
Enforcing clang-tidy works perfectly b...
Paquette asked 30/4, 2021 at 17:1
2
I'm using clang-tidy in a medium-size project with the following three folders:
srcA
srcB
external
I'm trying to exclude external folder from the analysis, but with no luck.
The command I'm using ...
Tonguelash asked 7/11, 2022 at 15:59
2
Solved
I am having trouble getting clang-tidy to read my compilation-database.
If I try:
clang-tidy --config-file ./.clang-tidy -checks=* -p ./target
or
clang-tidy --config-file ./.clang-tidy -checks=* -...
Famulus asked 3/2, 2023 at 0:30
1
Solved
I recently updated my project and its CI pipelines to use C++20 features. When I changed the compiler settings to use C++20, clang-tidy started to emit the following warning (I treat them as errors...
Dappled asked 21/7, 2021 at 20:15
4
How can one pass a clang flag, e.g. -fms-compatibility-version with the <LANG>_CLANG_TIDY CMake property? On the CLI this is easy:
clang-tidy main.cpp -- -fms-compatibility-version=19.10
B...
Platelayer asked 18/10, 2017 at 11:3
1
After some effort, I convinced both the clang compiler and clang-tidy (static analyzer) to warn of a use-after-move situation. (see https://stackoverflow.com/a/74250567/225186)
int main(int, char**...
Occlusive asked 31/10, 2022 at 16:10
5
Solved
Since employing ccache on our CI server, we find that the bottleneck in terms of build time is now our static analysis pass, that uses clang-tidy, among other tools. Does anyone know of a way to ac...
Wingless asked 3/12, 2018 at 16:7
2
Solved
NO_SYSTEM_FROM_IMPORTED tells us that IMPORTED targets automagically get -isystem. Does that also hold for targets introduced to the project with FetchContent?
If not (I assume so due to having pro...
Devaney asked 25/9, 2020 at 12:27
1
Solved
I'm using clang-tidy 10 on a project and it's behaving weirdly on Windows with the MSVC STL. A minimal example is the following:
#include <iostream>
#include <stdexcept>
int main()
{
...
Siamang asked 3/4, 2020 at 14:31
2
Solved
I am using clang-tidy from cmdline clang-tidy readability-implicit-bool-conversion ... <other_options>".
This clang-tidy option has the sub-option AllowPointerConditions, in order for clang-t...
Klina asked 7/11, 2018 at 8:44
0
My team is interested in adding a tool to enforce style guidelines for C++. Two of the best options we have researched are clang-tidy and clang-format.
clang-format appears to meet nearly all of ou...
Toilworn asked 20/9, 2022 at 15:15
1
Solved
There are various posts about this - but I can't seem to find a definitive answer. Some people are saying it works and others not, and yet others saying its tools / IDEs that are the issue.
So I ma...
Madonnamadora asked 7/7, 2022 at 12:55
1 Next >
© 2022 - 2025 — McMap. All rights reserved.