source-inspector is a set of utilities to inspect and analyze source code and collect interesting data using various tools such as code symbols, strings and comments. This is also a ScanCode-toolkit plugin.
Homepage: https://github.com/aboutcode-org/source-inspector License: Apache-2.0
This utility is designed to work on Linux and POSIX OS with these utilities:
- xgettext that comes with GNU gettext.
- universal ctags, version 5.9 or higher, built with JSON support.
On Debian systems run this:
sudo apt-get install universal-ctags gettext
On MacOS systems run this:
brew install universal-ctags gettext
Clone this repo
Run:
./configure --dev source venv/bin/activate
Run tests with:
pytest -vvs
Run a basic scan to collect symbols and display as YAML on screen:
scancode --source-symbol tests/data/symbols_ctags/test3.cpp --yaml -
Run a basic scan to collect strings and display as YAML on screen:
scancode --source-string tests/data/symbols_ctags/test3.cpp --yaml -
Run a basic scan to collect symbols, strings and comments using Pygments, and display them as YAML on the screen:
scancode --pygments-symbol-and-string tests/data/symbols_ctags/test3.cpp --yaml -
Run a basic scan to collect symbols and strings using Tree-Sitter, and display them as YAML on the screen:
scancode --treesitter-symbol-and-string tests/data/symbols_ctags/test3.cpp --yaml -
This project is funded, supported and sponsored by:
- Generous support and contributions from users like you!
- the European Commission NGI programme
- the NLnet Foundation
- the Swiss State Secretariat for Education, Research and Innovation (SERI)
- Google, including the Google Summer of Code and the Google Seasons of Doc programmes
- Mercedes-Benz Group
- Microsoft and Microsoft Azure
- AboutCode ASBL
- nexB Inc.
This project was funded through the NGI0 Core Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101092990.
https://nlnet.nl/project/Back2source-next/
This project was funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101069594.