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/aboutcode-org/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 -
Acknowledgements, Funding, Support and Sponsoring
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.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file source_inspector-0.7.1.tar.gz.
File metadata
- Download URL: source_inspector-0.7.1.tar.gz
- Upload date:
- Size: 72.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88f2fdb405edd09bc1a2d41bfe2853054c816967f913f261817b605476504e99
|
|
| MD5 |
9869725980ac658d717667688f53ceef
|
|
| BLAKE2b-256 |
ee4e1f786bf2e1106cdcc3dc06f3debd2f6327db8cf3f91f2cdf295cc9b3ebaf
|
Provenance
The following attestation bundles were made for source_inspector-0.7.1.tar.gz:
Publisher:
pypi-release.yml on aboutcode-org/source-inspector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
source_inspector-0.7.1.tar.gz -
Subject digest:
88f2fdb405edd09bc1a2d41bfe2853054c816967f913f261817b605476504e99 - Sigstore transparency entry: 836513680
- Sigstore integration time:
-
Permalink:
aboutcode-org/source-inspector@bb101bf35ce2b5ffb0225ba46380882d4814e5ab -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/aboutcode-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@bb101bf35ce2b5ffb0225ba46380882d4814e5ab -
Trigger Event:
push
-
Statement type:
File details
Details for the file source_inspector-0.7.1-py3-none-any.whl.
File metadata
- Download URL: source_inspector-0.7.1-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adf7373c8b4ebe6d080142d089b460591809183ee6217a5214f0403d67c43baa
|
|
| MD5 |
e2b137cd68a3518c3fc43ecf1fe3ca6f
|
|
| BLAKE2b-256 |
35f684bf5d2059fc301a04758564f4e43e23f1811e2d0c20bf1db7714351b7bc
|
Provenance
The following attestation bundles were made for source_inspector-0.7.1-py3-none-any.whl:
Publisher:
pypi-release.yml on aboutcode-org/source-inspector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
source_inspector-0.7.1-py3-none-any.whl -
Subject digest:
adf7373c8b4ebe6d080142d089b460591809183ee6217a5214f0403d67c43baa - Sigstore transparency entry: 836513681
- Sigstore integration time:
-
Permalink:
aboutcode-org/source-inspector@bb101bf35ce2b5ffb0225ba46380882d4814e5ab -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/aboutcode-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@bb101bf35ce2b5ffb0225ba46380882d4814e5ab -
Trigger Event:
push
-
Statement type: