qlty

qltysh活跃维护

统一的代码质量命令行工具,把多种语言的 lint、自动格式化、安全扫描和可维护性检查收进一个 CLI,省去逐个配置工具的麻烦。

💎 Code quality CLI for universal linting, auto-formatting, security scanning, and maintainability

v0.668.0发布于 2026-11-06 19:10 UTC3,220star +3 / 7 天276fork同步于 2026-11-10 11:41 UTC

怎么上手

由 README 提炼,执行前请确认
curl https://qlty.sh | bash
cd my_repo/ && qlty init
硬件要求按 README 说明

README 未说明具体硬件要求,仅说明支持 Mac、Linux、Windows,且运行 linter 不依赖 Docker。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

多语言代码质量 CLI,一个工具统一跑 lint、格式化、安全扫描和可维护性分析

统一的代码质量命令行工具,把多种语言的 lint、自动格式化、安全扫描和可维护性检查收进一个 CLI,省去逐个配置工具的麻烦。

核心能力

  • 集成 70+ 静态分析工具,覆盖 40+ 语言
  • 用 .qlty/qlty.toml 声明式配置并自动生成
  • Git 感知,只聚焦新引入的质量问题
  • 内置缓存与并发加速静态分析
  • 支持 pre-commit/pre-push Git 钩子集成

容易踩的坑

安装脚本会下载原生二进制,需能访问 qlty.sh;linter 插件需在 .qlty/qlty.toml 中启用或通过 qlty plugins enable 添加;需在 Git 仓库内执行 qlty init。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.668.0
  1. v0.668.0Release v0.668.0最新正式版2026-11-06 · 2026-11-06 19:10 UTC

    Fixed

    • Install block-form source blocks in a Ruby plugin's package_file, so Gemfiles with commercial gem sources like Sidekiq Pro no longer fail with syntax error, unexpected 'end' (#3003)
    • Reinstall a Ruby package_file tool when its plugin environment entries change, so a newly added BUNDLE_<HOST> credential takes effect instead of failing with Bundler::GemNotFound (#3005)
    • Send QLTY_GITHUB_TOKEN only on direct requests to api.github.com, not to github-proxy.qlty.sh (#2989)
  2. v0.667.0Release v0.667.02026-11-03 · 2026-11-03 17:58 UTC
    查看更新说明

    Fixed

    • Keep Composer's cache path independent of the PHP version, so the shared Composer PHAR stays at a stable path across PHP runtimes and prepare scripts that reference it keep working (#2994)
  3. v0.666.0Release v0.666.02026-11-03 · 2026-11-03 13:10 UTC
    查看更新说明

    New

    • Select the PHP runtime baked into Qlty Cloud runner images for PHP plugins and Composer, supporting PHP 8.1 through 8.5 with 8.3 as the default (#2988)

    Fixed

    • Format Rust files with their Cargo package's edition, so rustfmt no longer fails to parse 2018+ syntax such as async fn (#2992)
    • Run rustfmt on only the targeted files, so qlty fmt and diff runs no longer fail when a changed file declares a module whose file is not also checked (#2991)
    • Apply the nearest .tflint.hcl config to Terraform in subdirectories without their own config, so tflint no longer misses configured rulesets (#2932)
    • Stop reinstalling every PHP plugin when the pinned Composer version changes (#2986)
  4. v0.665.0Release v0.665.02026-10-29 · 2026-10-29 22:09 UTC
    查看更新说明

    Security

    • Upgrade the pinned Composer to 2.11.0, which drops the compromised eMudhra certificate root from its bundled CA list and rejects the compromised intermediates even when the system store trusts their roots. Each machine installs Composer 2.11.0 and reinstalls its PHP plugins on the next run (#2984)

    Notice: PHP plugins reinstall once (2026-10-29)

    From v0.665.0, the first run that uses a PHP plugin reinstalls every PHP plugin, with no cache clearing needed. PHP plugins don't run Composer, so a new Composer alone wouldn't need a reinstall. This one does because of the plugin code already on disk. An earlier Composer downloaded that code, and it could have accepted a connection that presented the compromised eMudhra certificates. Reinstalling downloads the code again through Composer 2.11.0, which rejects them.

    • The first run needs network access. It downloads Composer from getcomposer.org and the plugins from Packagist. On a machine that can't reach them, PHP plugins fail to install until it can.
  5. v0.664.0Release v0.664.02026-10-29 · 2026-10-29 18:15 UTC
    查看更新说明

    Security

    • Default the managed Java runtime to Temurin 25.0.5+8, which rejects the compromised eMudhra intermediate certificate authorities that the previous default still trusted. radarlint-kotlin moves to 2.1.0 so Kotlin analysis keeps working on Java 25. See GHSA-f55x-97q4-pfrc (#2977)

    Notice: Java plugins run on Java 25 (2026-10-29)

    From v0.664.0, Java-based plugins run on Temurin 25.0.5+8 unless qlty.toml pins a Java version under [runtimes.enabled]. If you added the interim java = "25.0.5+8" pin from GHSA-f55x-97q4-pfrc, you can remove it.

    • More Kotlin issues. radarlint-kotlin 2.1.0 bundles a newer SonarSource Kotlin analyzer that resolves types and parses newer Kotlin syntax, so it reports more issues than 2.0.0. In our tests on open source projects, Kotlin issue counts rose by 4% to 15%. kotlin:S1128, kotlin:S1862 and kotlin:S6619 report some false positives. To turn a rule off, add a line such as radarlint.rules.kotlin.S1128=false to radarlint.properties.
    • Pinned plugin versions that fail on Java 25. radarlint-kotlin 2.0.0 and earlier analyze nothing and report no error, so upgrade to 2.1.0. google-java-format 1.26.0 and earlier crash, so upgrade to 1.27.0 or later. If you can't upgrade yet, pin java = "22.0.1+8" under [runtimes.enabled], and remove the pin once you upgrade, because Java 22 still trusts the compromised certificate authorities.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Universal linting, auto-formatting, maintainability, and security scanning

    Qlty CLI is a multi-language code quality tool for linting, auto-formatting, maintainability, and security with support for 70+ static analysis tools for 40+ languages and technologies.

    With Qlty CLI, polyglot team can take advantage of the best code quality static analysis with fast, consistent, and unified results through a single tool. Configuration is done through a simple .qlty/qlty.toml file in your repository, which can be auto-generated based on the languages you use.

    The Qlty CLI is completely free for all use, including for commercial projects, with no limits on contributors.

    Maintainability Code Coverage Unit Tests Latest release docs.qlty.sh GitHub stars


    📖 Table of Contents


    ✨ Key Features

    What We Do

    FeatureAdvantage
    🐛LintingComprehensive language support in one tool
    🖌️Auto-formattingConsistent code style everywhere
    💩MaintainabilityCode smells like copy-paste detection and complexity
    🚨Security scanningSAST, SCA, secret detection, IaC analysis, and more
    🚦Code coverageTotal coverage and diff coverage
    📊Quality metricsComplexity, duplication, LOC, etc.

    How We Do It

    FeatureAdvantage
    🌲Git-awareFocus on newly introduced quality issues
    ⚡Auto-initializationGet up and running in two minutes
    ✅AutofixesIncluding tool-generated and AI-generated fixes
    ⚙️Config as codeVersion controlled with maximum flexibility
    🏎️Caching and concurrencyThe absolute fastest way to run static analysis
    🪝Git hooksIntegrate with pre-commit and pre-push hooks
    🤖Pull request reviewsAutomated feedback in comments and statuses
    🌐Runs anywhereMac, Linux, and Windows with no dependency on Docker
    🦀Written in RustFast execution and easy to contribute
    🎁100% freeIncluding for commercial projects, with no contributor limits
    ⚖️Fair SourcePublic on GitHub with delayed open source publication (DOSP). PRs accepted!

    💡 Learn more in the Documentation.

    Qlty Software: Code quality and coverage done right

    Qlty CLI is part of Qlty Software's comprehensive platform for code quality. Bring code quality into every step of your software development workflow with:


    🚀 Quick Start

    Installation

    The fastest way to install Qlty CLI is using our installer scripts which install our native binaries:

    # Install on MacOS or Linux
    curl https://qlty.sh | bash
    
    
    # Install on Windows
    powershell -c "iwr https://qlty.sh | iex"
    

    We also package the CLI as a Docker image on GitHub Container Registry (GHCR).

    [!NOTE] The Qlty CLI does not use Docker to run linters. By running linters natively, we achieve maximum performance. The Docker image is provided for situations where running the CLI as a containers is preferred over running it as a native binary.

    Setting up Qlty in a new repository

    Setup Qlty within a Git repository:

    cd my_repo/
    qlty init
    

    Usage

    Example CommandDescription
    qlty initSetup Qlty within a Git repository
    qlty check --sample=5View a sample of lint issues
    qlty fmt --allAuto-format the codebase
    qlty smells --allScan for code smells like duplication
    qlty metrics --max-depth=2 --sort complexity --allReview a summary of code quality metrics

    Configuration

    Qlty CLI is configured using a .qlty/qlty.toml file in your Git repository. You can generate a default configuration with qlty init and then customize it.

    Read our documentation about configuration for more information.


    🧹 Available Linters

    Over 20,000 code quality rules are available via the Qlty CLI through its 60+ linter plugins.

    To enable new plugins by adding them to your .qlty/qlty.toml file run:

    qlty plugins enable <NAME>
    
    TechnologyAvailable code quality tools
    All filesast-grep, gitleaks, ripgrep, semgrep, trivy, trufflehog, vale
    Apexpmd
    C#complexity, duplication
    C/C++osv-scanner, trivy
    CloudFormationcheckov
    CoffeeScriptcoffeelint
    CSSbiome, prettier, stylelint
    Dartosv-scanner, trivy
    Dockercheckov, dockerfmt, hadolint, radarlint, trivy
    Dotenvdotenv-linter
    Elixircomplexity, duplication, osv-scanner, trivy
    Erlangosv-scanner, trivy
    GitHub Actionsactionlint
    Gocomplexity, duplication, gofmt, golangci-lint, osv-scanner, radarlint
    GraphQLprettier
    HTMLprettier
    Javacheckstyle, complexity, duplication, google-java-format, osv-scanner, pmd, radarlint, trivy
    JavaScriptbiome, complexity, duplication, eslint, knip, osv-scanner, oxc, prettier, radarlint, trivy
    JSONbiome, prettier
    Kotlincomplexity, duplication, osv-scanner, radarlint, trivy
    Kuberneteskube-linter
    Markdownmarkdownlint, prettier
    OpenAPIredocly, spectral
    PHPcomplexity, duplication, osv-scanner, php-codesniffer, php-cs-fixer, phpstan, radarlint, trivy
    Prismaprisma
    Pythonbandit, black, complexity, duplication, flake8, mypy, osv-scanner, radarlint, ruff, trivy
    Rosv-scanner, trivy
    Rubybrakeman, complexity, duplication, osv-scanner, radarlint, reek, rubocop, ruby-stree, standardrb, trivy
    Rustclippy, complexity, duplication, osv-scanner, rustfmt, trivy
    SASSprettier, stylelint
    Scalaradarlint
    Shellshellcheck, shfmt
    SQLsqlfluff
    Swiftswiftlint
    Terraformcheckov, osv-scanner, radarlint, tflint, trivy
    TypeScriptbiome, complexity, duplication, eslint, knip, oxc, prettier
    VB.NETcomplexity, duplication
    YAMLprettier, trivy, yamllint

    The full list of plugins is available on GitHub.


    📊 Code Quality Metrics

    The Qlty CLI calculates a variety of code quality metrics which are available through the qlty metrics subcommand and as trends on Qlty Cloud.

    Quality metrics are available for C, C++, C#, Elixir, Go, Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust, Swift, TypeScript, and VB.NET.


    🖥️ System Requirements

    Qlty CLI is available for MacOS, Linux, and Windows on x86 and ARM platforms.

    Additional requirements for PHP linters

    Certain PHP linters require a working installation of PHP available in your $PATH. To install PHP, use Homebrew or an alternative method.

    Runner images that set QLTY_PHP_RUNTIMES_DIR=/opt/qlty/php provide a fixed set of PHP versions. Select a supported minor line in your configuration:

    [runtimes.enabled]
    php = "8.4"
    

    The initial supported lines are 8.1, 8.2, 8.3, 8.4, and 8.5; the default is 8.3. The runner installs the available Sury packages at image build time and records the exact installed revisions. New patches reach customers through runner image releases; rebuilding an image for unrelated changes can also update PHP. Qlty selects the baked interpreter for Composer and PHP plugins without installing system packages or contacting APT during a run. 8.3, 8.3.7, and 8.3.x all select the image's baked 8.3 patch. Patch numbers select their minor line rather than requiring that historical patch. If an exact patch request differs from the baked version, Qlty logs a warning during installation with the requested and selected versions. Each interpreter uses its own configuration and extensions.

    Previously, PHP runtime configuration was ignored. To preserve working builds, unsupported or unrecognized values such as 7.4, 8.0, 8, ^8.3, and latest produce a warning during installation and use the image's PHP 8.3. Set a supported minor line to select that interpreter explicitly.

    Without QLTY_PHP_RUNTIMES_DIR, PHP continues to come from the local $PATH.


    🛟 Help or Feedback


    🧑‍💻 Contributing

    Adding plugins

    Creating a plugin can be as easy as writing a small plugin definition TOML file. If the tool has a custom output format (instead of a standard like SARIF), then writing a simple output parser in Rust is also needed.

    We also happily accept requests for new plugins via GitHub issues.

    Developing the CLI

    Developing on Qlty CLI requires a working Rust toolchain and adheres to the standard Rust development process:

    git clone https://github.com/qltysh/qlty.git
    cd qlty
    cargo build
    cargo test
    

    More information

    More information about how to contribute can be found in CONTRIBUTING.md.

    Reports of security vulnerabilities should be handled with the process outlined in SECURITY.md.


    ⚖️ License

    Qlty CLI is published under a Fair Source license. As Fair Source, the Qlty CLI is free to use (including in commercial contexts), modify, and distribute in accordance with its license.

    This code is made available under the Business Source License 1.1 (BSL) and transitions into Open Source via a Delayed Open Source Publication (DOSP). More details are available in LICENSE.md.

    Acknowledgements

    We would like to thank all of the developers of code quality tooling like linters and meta-linters as well as everyone who has contributed to the field of open source static analysis. Qlty CLI stands on the shoulders of decades of this excellent work.

    Licenses for code incorporated into Qlty CLI can be found in the docs/licenses folder.