A Python-based command-line application to lint and enforce consistent settings across GitHub repositories
Project description
Lintr
A powerful and flexible GitHub repository settings linter.
Highlights
- ✅ Enforces consistent repository configurations.
- 🔒 Monitors key repository settings against predefined rules.
- 🛡️ Helps mitigate security issues.
- ⚙️ Streamlines repository management.
- 🤖 Automates checks for repository hygiene.
Installation
Install Lintr from PyPI.
# Using pip.
pip install lintr
# Using pipx.
pipx install lintr
# Using uv.
uv install lintr
After installation, run Lintr via the lintr command. The command line reference documentation can be viewed with lintr help.
You can also invoke Lintr by running the lintr module as a script through the Python interpreter, python -m lintr ....
Features
Command-line Interface (CLI)
Operate Lintr effortlessly through its CLI. Whether it’s linting all your repositories, listing available rules, or initializing a configuration file, every task can be performed with simple commands.
Pre-defined Rules
tba
Rule Sets
Lintr comes with pre-built rule sets covering a wide range of repository configurations, including branch policies, permissions, issue settings, and more.
Automatic Fixes
For many common issues, Lintr not only detects problems but can also automatically apply fixes. This is especially useful in large environments where manual interventions might be too time-consuming.
Customizability
Every project is unique. Configure Lintr with repository-specific rules and settings as needed.
Detailed Output and Reporting
Get clear and concise feedback about each check, including colorized status symbols and descriptive messages. This clarity helps you quickly identify and address any problems.
Purpose of Lintr
Lintr was built with the aim of streamlining repository management by automatically linting various aspects of a repository’s configuration. At its core, the tool monitors key repository settings and compares them against a set of predefined rules – from branch naming conventions to GitHub permission configurations. Here’s why Lintr exists:
• Addressing Inconsistencies:
Many organizations face challenges due to inconsistent repository configurations, which can lead to fragmented practices and unexpected security issues. Lintr helps mitigate these issues by ensuring that every repository adheres to the desired guidelines.
• Automation and Efficiency:
Manual checks are tedious and error-prone. With Lintr, you can automate the process of verifying repository settings, which not only saves time but also reduces the risk of human error.
• Extensibility:
Lintr is designed to be highly extensible. Not only does it come with a set of core rules, but it also allows you to create and register custom rules tailored to your organization’s specific needs.
• Improved Repository Health:
By catching configuration deviations early, Lintr helps maintain an overall healthy repository environment. This proactive monitoring can prevent potential security oversights and streamline your development workflow.
Who Should Use Lintr?
Lintr is aimed primarily at those who manage or contribute to multiple GitHub repositories and wish to enforce a uniform standard across them. Its flexibility and robust feature set make it ideal for:
• Repository Maintainers:
Ensure that every repository under your stewardship adheres to consistent configuration standards. Lintr helps catch misconfigurations before they cause issues.
• DevOps Engineers:
Integrate Lintr into your CI/CD pipelines to automate the process of repository configuration validation. This guarantees that your deployment environments meet the necessary guidelines.
• Developers Interested in Automation:
If you love automation and want your development process to be as robust as possible, Lintr offers automated linting that can save countless hours and reduce manual oversight.
Quick Demo
For a glimpse of Lintr in action, imagine running a single command that inspects all your repositories, reports discrepancies, and even fixes several common issues automatically. In one terminal session, you could see output much like the following:
✓ repository-name: Repository has default branch set correctly
✗ repository-name: Merge commits are disabled (fix available)
ℹ Would apply fix – run with --fix to enable auto-fixes
Feel free to include a screenshot or animated GIF of your terminal running Lintr to give newcomers an immediate visual impression of its capabilities.
────────────────────────────
By automating repository configuration audits, Lintr helps you maintain a high standard of consistency and operational excellence across your projects. Whether you’re looking to enforce best practices, improve repository security, or simply reduce manual overhead, Lintr is designed with your needs in mind.
For more details on installation, configuration, and advanced usage, continue reading the subsequent sections in this documentation. Happy linting!
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 lintr-0.1.0.tar.gz.
File metadata
- Download URL: lintr-0.1.0.tar.gz
- Upload date:
- Size: 46.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a95e1a671f9047130ca8bf07aff68beb6ec4e1eba746ddd180b00fd511af60
|
|
| MD5 |
d132f16961dbf26322ee2dff92476202
|
|
| BLAKE2b-256 |
48dcc8b17a6de0c474821e44d049e32a2731ae54a04d7baaa3ed2699c30809af
|
Provenance
The following attestation bundles were made for lintr-0.1.0.tar.gz:
Publisher:
publish.yml on jenskeiner/lintr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lintr-0.1.0.tar.gz -
Subject digest:
29a95e1a671f9047130ca8bf07aff68beb6ec4e1eba746ddd180b00fd511af60 - Sigstore transparency entry: 171947545
- Sigstore integration time:
-
Permalink:
jenskeiner/lintr@edf360ffb11d0bf51cf8be8c6fbf4b45c2b6cc39 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/jenskeiner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@edf360ffb11d0bf51cf8be8c6fbf4b45c2b6cc39 -
Trigger Event:
release
-
Statement type:
File details
Details for the file lintr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lintr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7401bc8c4a53067f635648673d760c6f53317617367ce7e5409c92ae260e5e6d
|
|
| MD5 |
4ac603321d3dd008c172feedfe5f601a
|
|
| BLAKE2b-256 |
cbb139776102cabb8aca696e134360d5db2ac7a528dc5dc5a95f85499eb30378
|
Provenance
The following attestation bundles were made for lintr-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jenskeiner/lintr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lintr-0.1.0-py3-none-any.whl -
Subject digest:
7401bc8c4a53067f635648673d760c6f53317617367ce7e5409c92ae260e5e6d - Sigstore transparency entry: 171947546
- Sigstore integration time:
-
Permalink:
jenskeiner/lintr@edf360ffb11d0bf51cf8be8c6fbf4b45c2b6cc39 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/jenskeiner
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@edf360ffb11d0bf51cf8be8c6fbf4b45c2b6cc39 -
Trigger Event:
release
-
Statement type: