https://github.com/schani/undefinder
Finds unused C #defines.
https://github.com/schani/undefinder
Last synced: 3 months ago
JSON representation
Finds unused C #defines.
- Host: GitHub
- URL: https://github.com/schani/undefinder
- Owner: schani
- Created: 2014-11-19T19:29:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-19T22:11:07.000Z (over 10 years ago)
- Last Synced: 2025-01-23T15:15:31.933Z (5 months ago)
- Language: Go
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Undefinder
Undefinder is a small utility that searches C codebases for unused
preprocessor `#define`s.Its biggest shortcoming is that it doesn't understand comments, so it
will treat commented out macros as defined, and it will treat textual
occurrences of macros in comments as uses.## Usage
Requires [go](https://golang.org/).
go run undefinder.go --exclude-defines="dont-report.c" /my/c/codebase
The output can be parsed like C compiler errors/warnings.