I'm currently working on a university assignment where it is mandated that we use C-style arrays for our code. Infuriatingly, they have left the default setting for warning about C-style arrays, which means that every time I use a one I need to add a // NOLINTNEXTLINE(modernize-avoid-c-arrays)
, which is absolutely terrible in terms of readability.
I have tried silencing the errors using // NOLINTBEGIN(modernize-avoid-c-arrays)
, but since that was only introduced in clang-tidy-14
, it isn't supported by our course-mandated clang-tidy-11
.
As such, my only option for a clean way of silencing these errors is by modifying the configuration file. Unfortunately, I haven't found any information on how to silence errors of a particular type in the configuration file. In fact, I haven't found any documentation on the expected structure of the .clang-tidy
file at all, except for some example files, none of which appear to silence any errors.
How can I silence the modernize-avoid-c-arrays
error on a project-wide basis from my .clang-tidy
file?