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

Support mongo-authored clang-tidy plugins in Evergreen

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Put us in a position to finally replace Python and regexes with real C++ tooling.

      As part of Skunkworks 2022, I wrote an out-of-source clang-tidy plugin to restrict our uses of boost::optional to the API that's supported by std::optional.
      Example plugin code: https://github.com/BillyDonahue/mongo_std_optional_migration/blob/master/tool/lib/MongoStdOptionalMigration.cpp

      For the migration I was trying to do, I put clang-tidy into --fix mode, but the plugin can just emit warnings instead.

      These small files could be hosted in the mongo server code tree the way we host our python-based cpplinter patterns now, but they would obviously have far more capability.

      I think the stock set of clang-tidy checks that we are enabling in Evergreen right now are often useful but not quite right for our codebase, and we could do much better by dynamically loading in our own checks that are hosted inside the codebase upon which they operate.

            Assignee:
            daniel.moody@mongodb.com Daniel Moody
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: