-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build clang-tidy support into node-cpp-skel #63
Comments
One challenge here is that clang-tidy needs to compile the code to do its checks. And to compile node-cpp-skel code requires a variety of unique include paths to node-gyp bundled headers and To avoid needing to write a second build system to collect and pass all these paths, it is best to have the build system generate a The I've found https://github.com/rizsotto/Bear, but it looks like overkill. It would need to be compiled itself, packaged in mason, and who knows how well it works. So, instead I think we should write a command that captures the output of the existing build, parses it, and rewrites the |
- avoid leaking memory when error is throw - incorrect usage of std::move which prevents copy elison Detected using the setup from mapbox/node-cpp-skel#63
Done in #64 |
The
clang-tidy
command is a powerful tool from the llvm suite with the ability to:Details at https://clang.llvm.org/extra/clang-tidy/
clang-tidy uses static analysis
We should integrate an easy clang-tidy workflow into node-cpp-skel by following the lead of both nodejs core, mapbox-gl-native, and OSRM:
Note: I presume clang-tidy will find very few issues with the current node-cpp-skel code, since it is fairly simple. The main idea here is to put this in place so that modules based on node-cpp-skel will more readily catch bugs before they hit production.
The text was updated successfully, but these errors were encountered: