doctest: Regression: Clang-Tidy warnings in 2.4.8

Description

When updating the test suite of nlohmann/json, several Clang-Tidy warnings had to be silenced:

  • cert-err58-cpp
  • cppcoreguidelines-avoid-c-arrays
  • fuchsia-statically-constructed-objects
  • hicpp-avoid-c-arrays
  • llvm-else-after-return
  • modernize-avoid-c-arrays
  • readability-else-after-return

(see https://github.com/nlohmann/json/pull/3228/files#diff-0534891fbc8b89b4c521057e7e8dff70d3cbeb822cc9991a3abad77848c289f8 for the suppressions and https://github.com/nlohmann/json/runs/4719931709?check_suite_focus=true for the failed run)

Steps to reproduce

  • Check out develop branch of https://github.com/nlohmann/json
  • Replace test/thirdparty/doctest/doctest.h with Doctest 2.4.8
  • Compile the tests suite with Clang-Tidy

Extra information

  • doctest version: v2.4.8
  • Operating System: Ubuntu 20.04.3 LTS
  • Compiler+version: Clang 14.0.0

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

The Clang-Tidy warnings are gone!

Unfortunately, there is now another issue with IPCC: https://github.com/doctest/doctest/issues/664

Thanks a lot! I’m trying in https://github.com/nlohmann/json/pull/3545.

Keep up the good work!

This was the last “major” fix. There are like 3 more open PRs that I’d like to merge and then we’re good to go. I’m aiming for a release this week.

After a lot of blood, sweat and tears I can finally tick this off the 2.4.9 pre-release checklist.

I’ve tested the fixed version with your project and it does not emit the warnings anymore!

Thank you for sticking with us!

I see. Do you need help setting up a CI job running Clang-Tidy? We have this target

https://github.com/nlohmann/json/blob/develop/cmake/ci.cmake#L644

and search for Clang-Tidy with

https://github.com/nlohmann/json/blob/develop/cmake/ci.cmake#L21

We are using an individual Docker image for the CI, but I guess some Clang-Tidy version should also be available in GitHub’s default Ubuntu runners.

Let me know if I can support.

No need to rush - I just wanted to make sure you have all you need. I just wanted to avoid adding all the exclusion to my code base…