setup bazel clang tidy to take allow multiple clang-tidy config files

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Critical - P2
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • DevProd Build
    • Fully Compatible
    • None
    • 2
    • 1-Day
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We current use one config file for all code checked in clang tidy. However there is a use case where we want to disable readability checks for generated code that we would normally use on hand written code.

       

      Currently our bazel clang tidy tool only accepts the one top level config file, but we should make it smart. Theres a couple of ways to do this, but I was thinking a hierarchy approach based off the directory structure. 

       

      When evaluating source files, the config file will be composed from any config files present in the directories of the path to that current source file being evaluated. The config file will overwrite checks use the  [+,-] syntax and simply add the check values which means the lowest config file will get priority.

       

      One possible pitfall is that the header files will be evaluated with different config files and may have conflicting checks for the same source code.

              Assignee:
              Daniel Moody
              Reporter:
              Daniel Moody
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: