https://github.com/stablecoder/unused-dependencies
Using C/C++ dependency information, finds files in specific target directories that aren't used during compilation.
https://github.com/stablecoder/unused-dependencies
Last synced: 10 months ago
JSON representation
Using C/C++ dependency information, finds files in specific target directories that aren't used during compilation.
- Host: GitHub
- URL: https://github.com/stablecoder/unused-dependencies
- Owner: StableCoder
- License: apache-2.0
- Created: 2019-12-03T13:21:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T18:29:40.000Z (about 6 years ago)
- Last Synced: 2025-01-13T13:52:29.373Z (12 months ago)
- Language: Shell
- Size: 20.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unused Dependency Search
This script allows for the use of C/C++ dependnecy file information (generated with GCC/Clang with the `-MD` option), and to determine which files in the target directories weren't used during compilation.
```
Usage: unused_dependencies.sh [OPTION]
Using compiler-generated dependency files (.d), search through target
directories and list desired file types that aren't used.
Such files can be generated via GCC/clang with the '-MD' option.
-f, --filter Adds the given regex to filter desired files
-j, --jobs Declare the number of parallel runs
-s, --source DirectorSource directory that is searched for .d files
-t, --target A target directory of where desired headers being checked for
-v, --verbose Outputs more detailed information
-h, --help Displays this help blurb
Multiple of each option can be applied to use more filters or directories.
Example: To only check h/hpp files, in the directory /usr/include, with
dependency data from /home/build
unused_dependencies.sh -f "\.h$" -f "\.hpp$" -s /home/build -t /usr/include
```