Skip to main content

en zh-cn

gen-linter-config

A LLM-based linter configuration generate tool .

How to use

  1. install:
pip install gen-linter-config
  1. Configuring LLM: This project uses litellm to call large model in a unified format, so please make sure that you have sufficient token resources before using it, api_key can be automatically read from environment variables or passed through parameters.

  2. Usage Example:

    gen-linter-config -t checkstyle --input "No more than 5 function parameters"
    gen-linter-config -t checkstyle --input rule.txt --out output.json
    gen-linter-config -t checkstyle --input "Wrap the code block in braces" --format json
    gen-linter-config -t checkstyle -m deepseek/deepseek-v4-pro -i "The package declaration is not line-wrapped. The column limit(Section 4.4, Column limit: 100) does not apply to package declarations."
    

Configure key as a system-level environment variable

Windows:Through the system property settings. Find system-properties, find advanced system settings-environment variable, and then create a new user variable with the variable named OPENAI_API_KEY and the value of the key in the user environment variable above.

Linux/macos:Set environment variables in the shell configuration file. Open the terminal and execute the instructions according to different shell:

# Bash
nano ~/.bashrc
# Zsh
nano ~/.zshrc
# Other shell may need to consult relevant documents.

Add in the configuration file:

export OPENAI_API_KEY=[Your OpenAI API key]

Then save and exit. Make the changes take effect:

# Bash
source ~/.bashrc
# Zsh
source ~/.zshrc
# 其它的shell可能需要查阅相关文档确定具体指令。          

Parameter Introduction

Parameter introduce must default
-h, --help show help message and exit n -
--tool, -t Specify the code checking tool y -
--input, -i File path or rule text y -
--model, -m Specify the model to use n qwen3.7-max
--out, -o Output file path n -
--examples, -e Sample text n -
--full Full prompt mode n false
--api-key, -k API key for LLM n -
--debug, -d Debug mode, output complete log in logs directory n false
--version, -v show program's version number and exit n -

If you don't specify an output file, the output will directly printed in the console.

List of supported tools

Tool Y/N
Checkstyle Y
ESLint Y
Biome Y
ClangTidy Y
CppCheck Y
Flake8 Y
PMD Y
Pylint Y
Reek Y
RuboCop Y
Ruff Y

Among them, Checkstyle and ESLint support a relatively perfect generation mechanism, while other tools do not. The configuration generation of more tools is still under development.

Metadata

Release files for gen-linter-config 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gen-linter-config 1.1.3
File Size Uploaded Provenance Actions
gen_linter_config-1.1.3.tar.gz 2.0 MB Without provenance Details for gen_linter_config-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gen-linter-config 1.1.3
File Interpreter ABI Platform Actions
gen_linter_config-1.1.3-py3-none-any.whl Python 3 none any Details for gen_linter_config-1.1.3-py3-none-any.whl

Total release size: 5.9 MB

Release files / gen_linter_config-1.1.3.tar.gz

Download URL gen_linter_config-1.1.3.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
bb5e15a5f17f47d31934596c26a4d37f4a1b222e12b3334fb3eb2c5eeab15fe4
BLAKE2b-256 checksum
How to use checksums
a02931131cc06b1be39dccc0be5f23cc8d94b93bbf65192cff03e545e8457452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / gen_linter_config-1.1.3-py3-none-any.whl

Download URL gen_linter_config-1.1.3-py3-none-any.whl
Size 3.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ffcdc24ec629a767c5162ff909070a9c04f71a1d6098defada56fd13c4dab0f0
BLAKE2b-256 checksum
How to use checksums
f7175bc682147aa41559fdbe6869b3a053326b3b3b73db49faa94a31f7233dfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for gen-linter-config 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page