I'm searching a tool that can check if there is a method in my C++ code thats line length is larger than a maximum I can define. I would like to define a threshold of e.g. 50 lines and if there is a function with e.g. 60 lines, the tool should warn me after analyzing.

I know that there is a functionality like that in checkstyle for java. We are using Clang Format right now to format our C++ code, but I didn't find any functionality like that in Clang Format or any other tool for C++.

Does anyone know a tool like that for C++? Thank you so much :)