Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97134

Promotion of clang-tidy warnings to errors should only be done in CI script

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible

      Putting WarningsAsErrors: '-*' in .clang-tidy interacts poorly with clangd. It promotes all warnings to errors, even normal clang warnings, even if you use -Wno-error. See the attached screenshot for the effect. This is arguably a bug in clangd, but it is probably a good idea to address this in our code anyway. We only actually want to promote clang-tidy warnings to errors in CI, not in developers' local tooling. So we should remove that line from .clang-tidy and opt-in to that behavior in our CI script.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: