What is Nostr?
Holger Schurig /
npub13zl…8ssw
2023-12-16 20:20:35
in reply to nevent1q…5c7x

Holger Schurig on Nostr: npub1fzx00…wt6h3 Here is my .clang-tidy file, which is honored by clangd: ...

npub1fzx00c36ny4whyuhg4ykx6987wxp885fmwmc784n27qcu6pavwzs3wt6h3 (npub1fzx…t6h3) Here is my .clang-tidy file, which is honored by clangd: https://0x0.st/HYuP.txt

And I meant "static analyzer", not "semantic checking". Basically, clangd has built-in what "scan-build" can do.

So, while editing, I get clang's warning. And when I compile, I use GCC. So two different compilers look over my code, and this is quite helpful.

Drawback of clangd: you need a compilation database. But both CMAKE and Meson (which I prefer) create them. If you're on pure makefiles, than you'd need something like https://github.com/rizsotto/Bear

Best of this: this all works not only with C, but also with C++. I program mostly in "mild C++", without STL or Boost, but with Qt, even non-GUI programs. They have all the containers I ever need, and with a much more eye-pleasing C++ code than idiomatic C++ code with tons of < > and : characters sprinkling your code.
Author Public Key
npub13zlmwdkm9datxe4vtqfkdn4l9kqmmelv57w2h2dy0felsrngdjns6q8ssw