https://github.com/clark800/ilint
C/C++ redundant include linter
https://github.com/clark800/ilint
c cpp lint linter posix-sh posix-shell shell-script
Last synced: 3 months ago
JSON representation
C/C++ redundant include linter
- Host: GitHub
- URL: https://github.com/clark800/ilint
- Owner: clark800
- License: mit
- Created: 2023-11-05T21:28:33.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-08T00:01:08.000Z (over 2 years ago)
- Last Synced: 2025-09-26T04:02:56.650Z (9 months ago)
- Topics: c, cpp, lint, linter, posix-sh, posix-shell, shell-script
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ilint
=====
`ilint` is a small POSIX shell script that brute-force searches for
redudant C/C++ includes by deleting include lines one at a time and testing
if it breaks the build.
To run, `cd` to the directory where your makefile or build script is and run
`ilint []...` where `` is the path to the source directory or
source file that you want to check.
If no `` is specified it will default to the current directory.
All C/C++ files and header files in each `` will be checked.
If your build command is non-standard, you can set the `BUILD` environment
variable to your build command.
Typically there will be some cases where an include is flagged as redundant,
but it is appropriate to keep it according to the "include what you use"
paradigm. This can happen when a header file includes other header files, which
occurs in the standard library. This issue can be minimized by using
[Pike style](https://www.lysator.liu.se/c/pikestyle.html) which says
"include files should never include include files".