clang-power-tools: Cannot perform tidy to header file.

// example.h
class A
{
public:
    virtual ~A() = default;
    virtual void func() = 0;
};
class B : public A
{
public:
    void func(); // 'override' is missing.
};
// example.cpp
#include "example.h"
void B::func() {}

I can’t perform tidy to header file. I can only perform it to source file. But the tidy operation to the source file cannot detect the problem that ‘override’ keyword is missing in the header file.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 25 (10 by maintainers)

Most upvoted comments

I’m having a hard time right now because of the same problem. I’m now using nuget, and property sheets of nuget packages add their include directories to C/C++ > General > Additional Include Directory. I hope it will be resolved. 😃

@cpp-red-lion

Use a custom .clang-tidy file in the directory you want to exclude, specifying no checks to perform there.

Oh, Looks so awesome idea. I’ll have a try 😃