include-what-you-use
A tool for use with clang to analyze #includes in C and C++ source files (by include-what-you-use)
cpplint
Static code checker for C++ (by cpplint)
include-what-you-use | cpplint | |
---|---|---|
40 | 2 | |
4,193 | 1,627 | |
1.3% | 1.5% | |
8.7 | 7.9 | |
19 days ago | about 2 months ago | |
C++ | Python | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
include-what-you-use
Posts with mentions or reviews of include-what-you-use.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-07-16.
-
Open Source C++ Stack
Linters keep the code base consistent and help to catch a lot of issues and even bugs way before the compiler is ran. Clang-Tidy is the one I am relying on. IWYU is really helpful in keeping the includes clean, reducing number of dependencies and reducing the build times.
- IWYU: A tool for use with Clang to analyze includes in C and C++ source files
-
Script to find missing std includes in C++ headers
Interesting...how does it compare to https://github.com/include-what-you-use/include-what-you-use ?
-
Speed Up C++ Compilation
Build Insights in Visual Studio, include-what-you-use).
Looks like https://include-what-you-use.org/ might do that.
-
Is it good or bad practice to include headers that are indirectly included from other headers?
If you are worried about includes, use https://github.com/include-what-you-use/include-what-you-use and stop thinking about it.
-
how do you guys manage a include file mess ?
Getting rid of that is not straightforard, though some tools can help with that
-
Is it appropiate to comment what a header is needed for?
You can use the tool https://github.com/include-what-you-use/include-what-you-use to do this for for. It tracks included files and can give comment for what is used from each file. It also warns you when you include files that you don’t use
-
Hey Rustaceans! Got a question? Ask here (16/2023)!
Invisible imports (e.g. traits). In Python, everything is fully namespaced (unless you from import * in which case all bets are off). It's always explicit where a name is coming from. C is the opposite: #include lets you refer to anything defined in the headers with no namespacing. That's why a common strategy (include what you use) has an associated code style: after every non-std #include you have a comment saying which of its definitions you are using. Of course, Rust is much less implicit, but I still sometimes struggle with traits. For example, you can use tokio::net::TcpStream, but you need to also use tokio::io::AsyncReadExt for the .read trait to be defined on TcpStream. This makes it hard (for me) to answer questions like "what traits are currently available in this scope?" and "why is this module being imported?"
- I implemented a NASA image compression algorithm
-
IncludeGuardian - improve build times by removing expensive includes
Aside from being closed source and not available on all architectures, how does it compare to iwyu(https://include-what-you-use.org/) or clang's relatively recent include-fixer which is also accessible via clangd?
cpplint
Posts with mentions or reviews of cpplint.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-03-04.
-
Configuring Cppcheck, Cpplint, and JSON Lint
I was configuring them as I was reading. I have done this before, but we had some months of use since then, and I have seen it working in real-time. I got a lot out of this second read and configuration round. I discovered that I over-configured Cppcheck; there is much more to get out of Cpplint, and I reviewed the JSON Schema versions.
-
C/C++ pre-commit hooks for static analyzers and linters
and five C/C++ static code analyzers: * clang-tidy * oclint * cppcheck * cpplint (recently added!) * include-what-you-use (recently added!)
What are some alternatives?
When comparing include-what-you-use and cpplint you can also consider the following projects:
clangd - clangd language server
Cppcheck - static analysis of C/C++ code
cppinclude - Tool for analyzing includes in C++
cpp-linter-action - A Github Action for linting C/C++ code integrating clang-tidy and clang-format to collect feedback provided in the form of file-annotations, thread-comments, workflow step-summary, and Pull Request reviews.
coc-clangd - clangd extension for coc.nvim
cmake-lint - Fork of https://github.com/richq/cmake-lint to continue maintenance
pre-commit-hooks - C/C++ hooks to integrate with pre-commit
uncrustify - Code beautifier
OCLint - A static source code analysis tool to improve quality and reduce defects for C, C++ and Objective-C
include-what-you-use vs clangd
cpplint vs Cppcheck
include-what-you-use vs cppinclude
cpplint vs cpp-linter-action
include-what-you-use vs coc-clangd
cpplint vs cmake-lint
include-what-you-use vs cmake-lint
cpplint vs pre-commit-hooks
include-what-you-use vs pre-commit-hooks
cpplint vs uncrustify
include-what-you-use vs uncrustify
cpplint vs OCLint