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

Cannot store reports with relative include paths: If the clang-tidy report refers to relative paths the resulting plist contains invalid absolute filepath #4130

Open
dkrupp opened this issue Dec 13, 2023 · 0 comments
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bug 🐛 clang-tidy 🐉 clang-tidy is a clang-based C++ “linter” tool.

Comments

@dkrupp
Copy link
Member

dkrupp commented Dec 13, 2023

This error prevents storing the results.

The problem can be reproduced like this:

In the original compiler call the header was included like this:
clang .. -include ../../../Sources/some_header.hpp

the clang-tidy textual output:

gtest_pred_impl.h:40:10: warning: circular header file dependency detected while including 'gte
st.h', please check the include path [misc-header-include-cycle]
   40 | #include "gtest/gtest.h"
      |          ^
/Users/dkrupp.ext/CCMain/Bin.MacARM/Modules_LLVM_4_0_64.dev/GoogleTest/gtest/gtest.h:388:10: note: 'gtest_pred_impl.h' included from here
  388 | #include "gtest/gtest_pred_impl.h"
      |          ^
**./../../../Sources/some_header.hpp:66:10: note: 'gtest.h' included from here**
   66 | #include "gtest/gtest.h"

./../../../Sources/some_header.hpp:66:10: note: 'gtest.h' included from here

In the plist file the file section some_header.hpp is referred to as:

 </array>
    <key>files</key>
    <array>
            <string>/Sources/some_header.hpp</string>
@dkrupp dkrupp added the clang-tidy 🐉 clang-tidy is a clang-based C++ “linter” tool. label Dec 13, 2023
@dkrupp dkrupp added this to the release 6.24.0 milestone Dec 13, 2023
@whisperity whisperity added bug 🐛 analyzer 📈 Related to the analyze commands (analysis driver) labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) bug 🐛 clang-tidy 🐉 clang-tidy is a clang-based C++ “linter” tool.
Projects
None yet
Development

No branches or pull requests

2 participants