Skip to content

luigig44/rust-code-analysis-python

Repository files navigation

rust-code-analysis-python

Build Status Docs Build Status PyPI - Version PyPI - Downloads PyPI - License

Python bindings for rust-code-analysis, a Rust library to analyze and collect metrics on source code.

Quick Start Guide

Full documentation available here: https://rust-code-analysis-python.readthedocs.org

%pip install rust-code-analysis-python
from rust_code_analysis_python import compute_metrics, remove_comments

# Get code metrics
metrics_result = compute_metrics("example.rs", code_string, unit=True)

# Remove comments from code
code_without_comments = remove_comments("example.c", code_string)

Developing

pip install -r dev_requirements.txt
# Must have rust installed (see rustup.rs)
# Run linting, build and test
tox run

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

About

Python bindings for rust-code-analysis, a Rust library to analyze and collect metrics on source code.

Resources

License

Stars

Watchers

Forks