awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
diffplug avatar

diffplug/spotless

0
View on GitHub↗
5,527 星标·536 分支·Java·Apache-2.0·3 次浏览

Spotless

Spotless is a multi-language formatting orchestrator and Gradle plugin that automates code styling across various programming languages within a single build pipeline. It functions as a coordinator for multiple third-party formatters, a code style linting tool, and a system for inserting and updating standardized license headers.

The project distinguishes itself through git-integrated style enforcement, using pre-push hooks and git references to apply formatting only to modified files or lines. It supports shared build configurations, allowing formatting rules to be distributed and loaded across multiple projects via remote artifacts to maintain a single source of truth.

The tool covers a broad range of capabilities, including source code text transformation via regular expressions and JSON patches, import management, and whitespace standardization. It integrates with a wide array of external binaries and tools for languages such as Java, Python, Kotlin, C++, Go, and TypeScript. Additional functionality includes formatting verification to ensure idempotency and incremental optimization to skip unchanged files.

Features

  • Formatting Plugins - Provides a Gradle plugin that automates multi-language code styling and formatting using integrated third-party tools.
  • Multi-Language Formatters - Provides a central orchestrator that applies consistent formatting rules across multiple programming languages within a single build pipeline.
  • Multi-Language Code Formatters - Automates consistent coding styles across various programming languages within a single build pipeline.
  • Line Ending Standards - Enforces consistent line ending styles (CRLF or LF) and character encoding across different operating systems.
  • Indentation Standardization - Standardizes source code indentation by converting between tabs and spaces based on a specified ratio.
  • External Command Execution - Executes local system commands with custom arguments to format source files using external binaries.
  • Git Style Verifiers - Uses pre-push hooks and git references to ensure style compliance only on modified files.
  • Line-Level Ratcheting - Restricts style changes to only the lines modified relative to a specific git reference.
  • Incremental Style Enforcement - Limits formatting operations to specific lines or files modified relative to a git commit or branch to ease adoption.
  • License Management Tools - Inserts and updates standardized copyright notices and license headers at the top of source files.
  • Shared Formatting Configurations - Provides the ability to share and distribute a single source of truth for formatting rules across multiple projects via remote artifacts.
  • Static Code Linting - Captures line-specific formatting violations and style errors without modifying the source files.
  • File Termination Newlines - Ensures every source file ends with a newline character for consistent file termination.
  • External CLI Formatter Integration - Executes local binary tools or package utilities to format code using third-party software.
  • Whitespace Cleaners - Automatically removes trailing spaces and tabs from the end of lines to maintain clean files.
  • Style Linting - Identifies formatting violations and reports style errors as lints for manual correction.
  • Kotlin Formatters - Applies ktfmt to Kotlin source files to ensure consistent styling and trailing comma usage.
  • Markdown Formatting - Standardizes the layout of Markdown files using the flexmark-java engine.
  • Regex Pattern Matching - Identifies specific text patterns in source files using regular expressions to report linting errors.
  • Regex Search and Replace - Transforms source code by identifying specific patterns with regular expressions and replacing them with defined strings.
  • Incremental Formatting - Optimizes execution time by tracking file modification timestamps to skip files that have not changed.
  • JSON Patching - Implements standard-compliant JSON patching to ensure specific structural requirements in JSON files.
  • Git Hook Automations - Installs a pre-push git hook that automatically checks for style issues and applies fixes before code is pushed.
  • Gradual Adoption Strategies - Limits style changes to files modified since a specific git reference to facilitate the gradual adoption of new standards.
  • Code Formatting Tools - Applies Prettier styling to source files by managing the required execution environment.
  • Embedded Code Formatters - Styles code blocks found within other files using regular expressions or markers.
  • Go Formatting Tools - Executes the gofmt tool to enforce consistent coding styles in Go projects.
  • SQL Formatters - Standardizes the layout of SQL scripts using the DBeaver formatting implementation.
  • Groovy Formatters - Applies the Groovy-Eclipse formatter to ensure consistent styling across Groovy source files.
  • Custom Formatting Rules - Enables project-specific code transformations using string-to-string functions within the build script.
  • ESLint - Applies ESLint styling and auto-fixing to source files via managed configuration.
  • Dynamic License Headers - Adds copyright notices to the top of files using dynamic year replacement and git history.
  • External Process Delegation - Delegates the formatting process to external binaries and system commands on the host OS.
  • Import Organizers - Sorts and groups import declarations based on a specified order and custom categories.
  • Wildcard Import Restrictions - Detects and flags asterisk-based wildcard import statements to ensure explicit class references.
  • Incremental Formatting Optimizations - Reduces execution time by tracking file modification times and skipping unchanged files during the formatting process.
  • Java Formatters - Provides standardized styling for Java source files, including string reflowing and import reordering.
  • JSON Pretty Printers - Reorganizes JSON source code into an indented, human-readable layout using the Jackson library.
  • License Header Insertion - Prefixes source files with a specified license header to ensure organizational legal compliance.
  • Regex Text Transformations - Provides the ability to transform source code by identifying and replacing patterns with regular expressions.
  • Scala Formatters - Styles Scala files by executing the scalafmt formatter.
  • Shell Script Formatters - Standardizes the layout of shell script files using the shfmt formatter.
  • YAML Formatters - Reformats YAML source files using the Jackson YAMLFactory engine.
  • Shared Formatting Configurations - Allows formatting rules to be distributed and loaded across multiple projects via remote artifacts.
  • Configuration Distribution and Sharing - Distributes and loads consistent formatting rules across multiple projects via remote artifacts.
  • C++ Code Formatting - Styles C++ source files by executing a clang-format binary.
  • Member Declaration Ordering - Organizes class methods and fields into a consistent vertical sequence based on visibility.
  • Code Mutators - Rewrites source code using specified mutators to improve consistency and quality.
  • Import Restrictions - Flags and forbids module import statements to ensure that only explicit imports are utilized.
  • Python Code Formatters - Applies the Black formatter to Python source files using a specified executable.
  • Source Code Transformation Engines - Modifies source files through regular expressions and JSON patches to enforce structural rules.
  • Unused Import Detection - Automatically deletes import statements that are not referenced within the source code.
  • Style Compliance Reporting - Reports differences between the current code and the expected format to detect style violations.
  • Automated License Header Injection - Inserts and updates standardized copyright notices and license headers using git history for accuracy.
  • Coding Best Practices - Applies modernization and security rules to ensure source code adheres to consistent language standards.
  • Java Coding Standards - Applies the Eclipse JDT formatter to ensure a consistent coding style for Java source code.
  • Embedded Language Formatters - Styles nested code snippets using language-specific rules and delimiters for multi-language files.
  • JavaScript and TypeScript Formatting - Styles JavaScript, TypeScript, CSS, and JSON files by delegating to the Biome executable.
  • Formatting Verification - Compares source files against expected formatted output to verify style compliance without modifying files.
  • Web Code Formatting Standards - Styles CSS, HTML, JS, JSON, and XML files using the Eclipse WTP formatter.
  • Development Tooling - Tool for keeping code formatting consistent.
  • Development Utilities - Automates code formatting and style enforcement.

Star 历史

diffplug/spotless 的 Star 历史图表diffplug/spotless 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Spotless 的开源替代方案

相似的开源项目,按与 Spotless 的功能重合度排序。
  • sds/overcommitsds 的头像

    sds/overcommit

    4,008在 GitHub 上查看↗

    Overcommit is a Git hook manager and pre-commit validation framework designed to automate the execution of scripts and checks during various Git events. It serves as a workflow automation tool that ensures code quality and project standards are met before changes are committed or pushed to a remote repository. The system distinguishes itself through a comprehensive YAML-based configuration that allows for detailed hook behavior control, including file execution filtering, conditional skipping, and the management of hook dependencies. It provides specialized roles such as a commit message vali

    Ruby
    在 GitHub 上查看↗4,008
  • dprint/dprintdprint 的头像

    dprint/dprint

    3,795在 GitHub 上查看↗

    dprint is a multi-language code formatter that applies consistent styling across various programming languages using a pluggable architecture. It functions as a unified project style management tool, a command-line interface for continuous integration style enforcement, and a Language Server Protocol implementation for real-time formatting in editors. The project is distinguished by a WebAssembly-based plugin system that loads sandboxed formatting logic from URLs or file paths. It further extends its capabilities through a process-based tool integration that wraps external command-line interf

    Rustformatter
    在 GitHub 上查看↗3,795
  • web-infra-dev/oxcweb-infra-dev 的头像

    web-infra-dev/oxc

    21,721在 GitHub 上查看↗

    oxc is a high-performance JavaScript toolchain developed in Rust for parsing, transforming, and analyzing JavaScript and TypeScript source code. It provides a set of core utilities including a parser that converts code into an abstract syntax tree, a linter for identifying problematic patterns, a formatter for standardizing visual style, and a minifier for reducing production file sizes. The project focuses on high-performance execution through a system design that utilizes single-pass parsing, zero-copy string slicing, and parallel worker processing to handle large codebases. It further opti

    Rust
    在 GitHub 上查看↗21,721
  • pre-commit/pre-commit-hookspre-commit 的头像

    pre-commit/pre-commit-hooks

    6,593在 GitHub 上查看↗

    This project is a comprehensive collection of pre-commit hooks designed to automate code linting, style enforcement, and file validation before changes are committed to version control. It provides a suite of ready-to-use scripts that serve as quality guards, including static analysis hooks, configuration file validators, and tools for maintaining version control integrity. The collection distinguishes itself by offering specialized guards for repository health and security. This includes detection of leaked credentials and private keys, prevention of large file commits, and enforcement of br

    Pythongitlinterpre-commit
    在 GitHub 上查看↗6,593
查看 Spotless 的所有 30 个替代方案→

常见问题解答

diffplug/spotless 是做什么的?

Spotless is a multi-language formatting orchestrator and Gradle plugin that automates code styling across various programming languages within a single build pipeline. It functions as a coordinator for multiple third-party formatters, a code style linting tool, and a system for inserting and updating standardized license headers.

diffplug/spotless 的主要功能有哪些?

diffplug/spotless 的主要功能包括:Formatting Plugins, Multi-Language Formatters, Multi-Language Code Formatters, Line Ending Standards, Indentation Standardization, External Command Execution, Git Style Verifiers, Line-Level Ratcheting。

diffplug/spotless 有哪些开源替代品?

diffplug/spotless 的开源替代品包括: sds/overcommit — Overcommit is a Git hook manager and pre-commit validation framework designed to automate the execution of scripts and… dprint/dprint — dprint is a multi-language code formatter that applies consistent styling across various programming languages using a… web-infra-dev/oxc — oxc is a high-performance JavaScript toolchain developed in Rust for parsing, transforming, and analyzing JavaScript… pre-commit/pre-commit-hooks — This project is a comprehensive collection of pre-commit hooks designed to automate code linting, style enforcement,… rome/tools — This project is a unified toolchain for JavaScript and TypeScript development, providing a suite of specialized tools… zh-google-styleguide/zh-google-styleguide — This project is a software engineering reference that provides a cross-language formatting standard and…