-
Type: Improvement
-
Resolution: Duplicate
-
Priority: 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.
- is related to
-
WT-5577 Add custom clang tidy check for alphabetical same line declarations
- Backlog
-
SERVER-68246 change calls to `boost::optional` members `is_initialized` and `get` (via clang-tidy)
- Closed
-
SERVER-68867 Use linter to prevent new instances of UninteruptibleLockGuard
- Closed
-
SERVER-71732 Support mongo-authored clang-tidy plugins
- Closed
-
SERVER-71733 Add mongo-authored clang-tidy plugins to evergreen
- Closed
- related to
-
SERVER-70052 Investigate static analysis mechanism for enforcing architectural rules
- Closed