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

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

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

rust-lang-nursery/rustfmt

0
View on GitHub↗
6,877 星标·1,020 分支·Rust·Apache-2.0·4 次浏览rust-lang.github.io/rustfmt↗

Rustfmt

rustfmt is a tool that automatically rewrites Rust source code to adhere to a consistent and standardized style guide. It functions as both a code formatter for transforming source files and a style linter used to verify if code matches required formatting rules.

The system is configurable, allowing for the definition of custom formatting rules and language editions through configuration files to override default styles. It also supports selective formatting by using dedicated skip markers to prevent specific blocks of code from being modified.

The tool provides capabilities for both source code rewriting across project directories and style compliance verification to identify non-compliant source during automated builds.

Features

  • Source Code Rewriting - Automatically rewrites Rust source code to adhere to a consistent style guide across project directories.
  • Source Code Formatters - Preventing specific blocks of Rust code from being modified by the formatter using dedicated skip markers.
  • Automatic Code Formatters - Automatically rewrites Rust source code to adhere to a consistent and standardized style guide.
  • Coding Style Tools - Includes a verification utility to check if source code matches the required style guide for automated builds.
  • Formatting Configurations - Allows customization of formatting behavior and language editions via a configuration file.
  • Formatting Engines - Provides a rule-based engine that determines the final layout of tokens and whitespace based on configuration.
  • Style Compliance Tools - Verifies that Rust code matches required style guidelines to prevent errors during CI processes.
  • Style Linters - Verifies if Rust code matches required formatting rules and returns errors for non-compliant source.
  • Formatter Configurations - Utilizes external configuration files to define formatting rules and file exclusion patterns.
  • Formatting Exclusion Directives - Provides mechanisms to selectively disable code formatting for specific blocks using skip markers.
  • Formatting Exclusion Markers - Identifies specific attributes or comments in the source to skip the transformation process for those code segments.
  • Token Stream Preservation - Maintains a mapping of original tokens to ensure comments and attributes remain attached to their related expressions.
  • Idempotency Patterns - Employs an idempotent formatting cycle to ensure stable and consistent style application through repeated processing.
  • Language-Specific Formatting Overrides - Supports defining specific formatting overrides and language editions for Rust projects.
  • Recursive Tree Transformers - Uses a recursive tree transformer to walk the syntax tree and apply indentation and line-breaking rules.
  • 开发者工具 - Tool for enforcing consistent code formatting.

Star 历史

rust-lang-nursery/rustfmt 的 Star 历史图表rust-lang-nursery/rustfmt 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

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

Start searching with AI

常见问题解答

rust-lang-nursery/rustfmt 是做什么的?

rustfmt is a tool that automatically rewrites Rust source code to adhere to a consistent and standardized style guide. It functions as both a code formatter for transforming source files and a style linter used to verify if code matches required formatting rules.

rust-lang-nursery/rustfmt 的主要功能有哪些?

rust-lang-nursery/rustfmt 的主要功能包括:Source Code Rewriting, Source Code Formatters, Automatic Code Formatters, Coding Style Tools, Formatting Configurations, Formatting Engines, Style Compliance Tools, Style Linters。

rust-lang-nursery/rustfmt 有哪些开源替代品?

rust-lang-nursery/rustfmt 的开源替代品包括: google/google-java-format — google-java-format is a Java code formatter and style enforcement tool. It reformats Java source code to adhere to a… rust-lang/rust-clippy — This project is a static analysis linter, code quality tool, and language auditor for Rust. It functions as an… beautify-web/js-beautify — js-beautify is a web language beautifier and code formatter designed to standardize the layout and structure of… standard/standard — Standard is a suite of static analysis tools for JavaScript, comprising a linter, formatter, and a predefined style… rubocop/rubocop — RuboCop is a static code analyzer, linter, and formatter for the Ruby language. It identifies style violations,… rust-lang/rustfmt — rustfmt is a Rust code formatter that operates as a Cargo subcommand, applying consistent formatting to Rust source…

Rustfmt 的开源替代方案

相似的开源项目,按与 Rustfmt 的功能重合度排序。
  • google/google-java-formatgoogle 的头像

    google/google-java-format

    6,145在 GitHub 上查看↗

    google-java-format is a Java code formatter and style enforcement tool. It reformats Java source code to adhere to a standardized style guide, ensuring consistent layout and indentation across entire projects or individual files. The project functions as a build pipeline linting tool for continuous integration workflows and as an IDE formatting plugin to replace native editor formatting. It can be embedded as a formatting library within code generation software to ensure machine-written output remains human-readable. The tool provides capabilities for reorganizing source code indentation and

    Java
    在 GitHub 上查看↗6,145
  • rust-lang/rust-clippyrust-lang 的头像

    rust-lang/rust-clippy

    13,309在 GitHub 上查看↗

    This project is a static analysis linter, code quality tool, and language auditor for Rust. It functions as an automated refactoring system designed to identify common mistakes and suggest idiomatic improvements for Rust source code. The tool identifies non-idiomatic patterns, performance bottlenecks, and code smells to improve the overall correctness and quality of the code. It specifically audits memory safety by flagging suspicious use of unsafe blocks and pointer manipulations and detects inefficient operations to optimize execution speed. The analysis surface covers coding style enforce

    Rustlintrust
    在 GitHub 上查看↗13,309
  • beautify-web/js-beautifybeautify-web 的头像

    beautify-web/js-beautify

    8,973在 GitHub 上查看↗

    js-beautify is a web language beautifier and code formatter designed to standardize the layout and structure of JavaScript, HTML, and CSS files. It reorganizes source code into a consistent, readable style by applying configurable indentation and spacing rules. The project includes a utility for unpacking minified scripts, which transforms compressed or obfuscated JavaScript into a human-readable format. It provides a command-line interface for executing bulk code reformatting across multiple files. The tool supports customizable formatting rules and language-specific overrides, which can be

    JavaScript
    在 GitHub 上查看↗8,973
  • rubocop/rubocoprubocop 的头像

    rubocop/rubocop

    12,879在 GitHub 上查看↗

    RuboCop is a static code analyzer, linter, and formatter for the Ruby language. It identifies style violations, smells, and errors in source code to ensure consistency and maintainability based on community guidelines. The project provides automatic source code formatting to rewrite files according to defined stylistic standards. It also functions as a language server protocol implementation, surfacing violations and suggested fixes directly within code editors. The tool covers code complexity monitoring to track the size of classes and methods and employs non-inclusive language detection to

    Rubycode-formatterhacktoberfestlinter
    在 GitHub 上查看↗12,879
  • 查看 Rustfmt 的所有 30 个替代方案→