Skip to main content

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:

  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 -

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

source_inspector-0.5.2.tar.gz (450.1 kB view details)

Uploaded Source

Built Distribution

source_inspector-0.5.2-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: source_inspector-0.5.2.tar.gz
  • Upload date:
  • Size: 450.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for source_inspector-0.5.2.tar.gz
Algorithm Hash digest
SHA256 0baa9f096a35e3ac02d2800fe02bf220fe6fda42d7e109cba65a927082986c0a
MD5 b681f67303eb6ea31459cfe98ddc8c53
BLAKE2b-256 6b8fe3cfe9dac8182adac1d34560a969222c2f9d529597f0af96f124ed6b9cc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for source_inspector-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5a157d123e4ad1b91c0e996ba11264ceb84c215e98c6673427a87eb628192d2
MD5 69a281beb686593531027c54202dda9a
BLAKE2b-256 08f633c5314475512dfcab3c286b25699fd47de624d604912e2c63ae97846c61

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page