Skip to main content

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:

  1. Clone this repo

  2. Run:

    ./configure --dev
    source venv/bin/activate
  3. Run tests with:

    pytest -vvs
  4. Run a basic scan to collect symbols and display as YAML on screen:

    scancode --source-symbol tests/data/symbols_ctags/test3.cpp --yaml -
  5. Run a basic scan to collect strings and display as YAML on screen:

    scancode --source-string tests/data/symbols_ctags/test3.cpp --yaml -
  6. 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 -
  7. 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.

Europa logo EC DG Connect logo

NGI logo NLnet foundation logo

AboutCode logo nexB logo

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.

NGI Zero Core Logo 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.

NGI Zero Entrust logo https://nlnet.nl/project/purl2sym/

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

source_inspector-0.7.2.tar.gz (73.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

source_inspector-0.7.2-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file source_inspector-0.7.2.tar.gz.

File metadata

  • Download URL: source_inspector-0.7.2.tar.gz
  • Upload date:
  • Size: 73.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for source_inspector-0.7.2.tar.gz
Algorithm Hash digest
SHA256 549273fd9ead43a2483de0cb77c5f3b42e0e5902a784bdd530d19d8bcc484ba4
MD5 3130a80cdbdefd8955ae3024af81cc64
BLAKE2b-256 f4dd49e665cd0da6ae5f57cb05ad25075f4a3a933f1b859575b4290a37889251

See more details on using hashes here.

Provenance

The following attestation bundles were made for source_inspector-0.7.2.tar.gz:

Publisher: pypi-release.yml on aboutcode-org/source-inspector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file source_inspector-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for source_inspector-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bab4c53c9873930546ceadd24bbcf327df6eb19c01b45556c441ca5998b71181
MD5 dcbc1678fa478f0bd1775b93bff210ce
BLAKE2b-256 2a1262460ea3485b809ceb56967f72eee34fc6db83dd6494a4a7ccd2815484d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for source_inspector-0.7.2-py3-none-any.whl:

Publisher: pypi-release.yml on aboutcode-org/source-inspector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page