Closed relder closed 4 years ago
Does clang-tidy work on C? I was under the impression it was only really useful in C++.
If you have C++ code in .h
and .c
files, I guess this still makes sense, but I'm a bit worried about it linting C code.
Given C++ is a superset of C, yes, works fine. Been using my version for months on straight C, finds mem leaks, null pointer derefs, bad indentation, etc. If anything there are too many checks that work on C (too much noise, overly picky on style). The whole class of C++ checks is of course pointless, but I get much use out of it in our straight C project.
I'm going to look into blacklisting files before I merge this. That way users will be able to opt out.
Is there an ETA on this one? I am also looking for a solution to this for C files to support checks that do not seem to be supported with just clangd. Thanks
@theswordsmahin I'm working on adding a blacklist now. Hopefully, this will be ready within a few days, but no promises.
Hi, I'd love it if this VSCode extension supported regular C as well. This seems to work for me.