Unfortunately there is no direct way to do this, clang-tidy only supports //NOLINT
and //NOLINTNEXTLINE
.
I don't know how much control you have about that code generation...you could generate it in one line, that could help you a lot as c++ doesn't care about whitespace.
A crude but effective solution is to use a text-manipulation tool like sed:
$ sed -i -re '/^\/\/BEGIN_NOLINT/,/^\/\/END_NOLINT/{s/$/\/\/NOLINT/}' *.cpp
This would add //NOLINT
at the end of every line between //BEGIN_NOLINT
and //END_NOLINT
comments (which can be probably generated).
You can also run clang-tidy with parameter
-line-filter='[{"name":"test.cpp","lines":[[1,10],[12,100]]}]'
Line 11 will be skipped in this example. This is however difficult to maintain as you need to update the filter every time you add/remove lines in the file. Maybe it would be a good idea to generate code into separate files if possible.