LegalLint: A Multi-Language License Compliance Linter
Project description
LegalLint
LegalLint is a license compliance linter for all programming languages, with current support for Python. It ensures that projects adhere to specified licensing policies, allowing users to enforce allowed licenses and trigger errors for disallowed licenses.
Features
- Detects license types for Python libraries.
- Customizable allowed and disallowed licenses.
- Skips specific libraries from license checking.
- TOML-based configuration for flexible settings.
Installation
To install LegalLint:
pip install legallint
Usage
CLI
$ legallint -l python
Example Configuration (pyproject.toml)
[licenses]
allowed = ["MIT", "Apache-2.0", "BSD-3-Clause"]
trigger_error = ["GPL-3.0", "AGPL-3.0", "Proprietary", "Unknown"]
# Libraries to skip
skip_libraries = ["example-lib1", "example-lib2"]
$ legallint -l python
---------------
PYTHON
---------------
✔ toml MIT
✔ pluggy MIT
✔ iniconfig MIT
✔ packaging Apache; BSD
✔ idna BSD
✔ requests Apache-2.0
✔ urllib3 MIT
‼ certifi MPL-2.0
✔ pytest MIT
✔ charset-normalizer MIT
legallint commands
$ legallint -h
usage: legallint [-h] [--verbose] [-v] [-l {python,node} [{python,node} ...]] [-u] [--license]
LegalLint is a cross-platform tool designed to ensure license compliance across multiple programming languages by analyzing dependencies and enforcing predefined license policies. LegalLint helps maintain legal standards by scanning the project’s dependencies and ensuring that only approved licenses (e.g., MIT, Apache 2.0) are used.
options:
-h, --help show this help message and exit
--verbose Enable verbose mode
-v, --version show program's version number and exit
-l {python,node} [{python,node} ...], --lang {python,node} [{python,node} ...]
Select one or more languages from: python
-u, --update Enable update mode
--license Enable license mode
License
LegalLint is distributed under the Apache-2.0 License. See LICENSE
for more information.
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
legallint-1.0.0.tar.gz
(16.1 kB
view details)
Built Distribution
legallint-1.0.0-py3-none-any.whl
(19.0 kB
view details)
File details
Details for the file legallint-1.0.0.tar.gz
.
File metadata
- Download URL: legallint-1.0.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f993c5cd95b10b1359ff1b373b72feef63980b1e0d1e0d7a63723b78dd38357e |
|
MD5 | 9a191f34ff36616ed2cf29e656ab1572 |
|
BLAKE2b-256 | d80ed399484320d2654c47cb0a365d3a7093a56243a8b41ef01b4595b983b5cd |
File details
Details for the file legallint-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: legallint-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224404fa3d8eed156c1461753e0e45c6aae2f2a6754fa7c644387c1e3838b987 |
|
MD5 | ff057c53c33dee439fd247c71e97efd7 |
|
BLAKE2b-256 | 397260b323c9fe261b89cc4501b21c386d3945cce2073489794ec7674349bad3 |