source-inspector
Project description
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/nexB/source-inspector License: Apache-2.0
Requirements
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
To get started:
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 -
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for source_inspector-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7663465d2da83a612e2b62d02ace125451a4f63ff3ab3259e5d2632451bc880e |
|
MD5 | 4b2363683a8c6329fc4bfbb77ba29a42 |
|
BLAKE2b-256 | f0d5df9469043638c7b87d24021ce0220e228993bc4090f91430d766e3831e13 |