question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore thirdparty library errors in clang-tidy

See original GitHub issue

Hi,

we have written cpp code which includes the boost library and while running with clang-tidy,we are getting an error which i am unable to fix since the error is coming from the boost library.

However, we have used some flags in .clang-tidy file like HeaderFilterRegex: '^(?!.*external).*'

Error: external/boost/boost/assign/list_of.hpp:455:29: error: no matching constructor for initialization of ‘boost::assign_detail::generic_list<std::pair<const std::basic_string_view<char16_t, std::char_traits<char16_t> >, std::shared_ptrsabre::base::parsers::ContextSAXHandler > >::Ty’ (aka ‘std::pair<const std::basic_string_view<char16_t, std::char_traits<char16_t> >, std::shared_ptrsabre::base::parsers::ContextSAXHandler >’) [clang-diagnostic-error] this->push_back(Ty(boost::forward<U0>(u0), boost::forward<U1>(u1), boost::forward<Us>(us)…));

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Sil3ntStormcommented, Jun 30, 2023

It would appear that my HeaderFilterRegex solution does not work because apparently clang-tidy does not support negative lookaheads in regular expressions.

@mariru27 I will see what I can do over the weekend.

0reactions
mariru27commented, Jun 30, 2023

Hi @Sil3ntStorm,

Can you help us by providing a small project with now behavior and how it should work? Verbose log from output will be helpful

Kind regards, Marina

Read more comments on GitHub >

github_iconTop Results From Across the Web

clang-tidy - ignore third party headers code
I wanted to use warnings-as-errors to have reliable way in CI to check whether commit introduces some new violations. Unfortunately I have some ......
Read more >
[Solved]-clang-tidy - ignore third party headers code-C++
The comments have already listed the ways to ignore errors contained within header files: using -isystem (in CMake, imported targets use this by...
Read more >
Clang-tidy ignore third party : r/cpp_questions
Hi team I have googled, but didn't find anything. How can I ignore third party code with cmake and clang-tidy? Thanks team!
Read more >
Ignoring Third Party Libraries with Regex · Issue #643
Problem: I am unable to ignore third party libraries, so Clang Tidy is stopping on "too many errors emitted". Things I have tried:...
Read more >
Clang-Tidy — Extra Clang Tools 18.0.0git documentation
Its purpose is to provide an extensible framework for diagnosing and fixing typical programming errors, like style violations, interface misuse, or bugs that ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found