9 Repos
Tools for maintaining consistent code style and syntax.
Explore 9 awesome GitHub repositories matching part of an awesome list · Code Formatters. Refine with filters or upvote what's useful.
Ruff is a high-performance static analysis and code formatting tool designed for Python. Built in Rust, it functions as a comprehensive engine that scans source code to detect programming errors, security vulnerabilities, and deviations from established coding standards. By parsing source code into a structured tree representation, it provides both automated linting and style enforcement across entire projects. The tool distinguishes itself through its speed and deep integration into the development lifecycle. It utilizes parallelized file processing to maximize throughput on large codebases
Extremely fast Python linter and formatter.
Dieses Projekt ist ein kompromissloser, deterministischer Code-Formatter für Python. Er funktioniert, indem er Quellcode in einen abstrakten Syntaxbaum parst und ihn gemäß einer starren, meinungsstarken Menge von Stilregeln neu generiert. Durch die Automatisierung des Formatierungsprozesses werden manuelle Stildiskussionen und Konfigurationsaufwand eliminiert, wodurch sichergestellt wird, dass der Code über ganze Projekte hinweg konsistent bleibt, unabhängig von der ursprünglichen Eingabe. Das Tool zeichnet sich durch seinen Fokus auf Geschwindigkeit und nahtlose Integration in Entwicklungsworkflows aus. Es nutzt inhaltsbasiertes Datei-Caching und parallele Verarbeitung, um eine hohe Leistung bei großen Codebasen aufrechtzuerhalten, während es gleichzeitig Versionskontroll-Hooks unterstützt, um die Stil-Konsistenz vor dem Commit sicherzustellen. Um die Projekthistorie zu bewahren, bietet es Mechanismen, um spezifische Commits in der Versionskontroll-Blame-Verfolgung zu ignorieren, wodurch sichergestellt wird, dass automatisierte Stiländerungen die ursprüngliche Autorenschaft nicht verdecken. Über Standard-Quelldateien hinaus erweitert der Formatter seine Fähigkeiten auf Jupyter-Notebooks, Typ-Stubs und eingebettete Codebeispiele innerhalb der Dokumentation. Er bietet breite Kompatibilität durch Plugins für gängige Texteditoren und integrierte Entwicklungsumgebungen sowie Unterstützung für das Language Server Protocol. Die Konfiguration wird über projektweite Dateien verwaltet, die automatisch innerhalb der Verzeichnishierarchie entdeckt werden, was ein konsistentes Verhalten über verschiedene Entwicklungsumgebungen hinweg ermöglicht.
Uncompromising and opinionated automatic code formatter.
YAPF ist ein Python-Code-Formatierer und Tool zur Einhaltung von Stilvorgaben. Es arbeitet als AST-basierter Reformattierer, der konkrete Syntaxbäume verwendet, um strukturelle Konsistenz und eine einheitliche visuelle Darstellung über Quelldateien hinweg sicherzustellen. Die Engine nutzt einen strafbasierten Layout-Optimierer, um die besten Zeilenumbrüche durch die Berechnung numerischer Kosten für verschiedene Formatierungsentscheidungen zu bestimmen. Sie verwendet einen Multiprozess-Code-Prozessor, um die Formatierung mehrerer Dateien auf mehrere CPU-Kerne zu verteilen. Das Tool deckt die Neuformatierung von Quellcode durch In-Place-Dateimodifikationen, Differenzanalysen und die Verarbeitung partieller Codefragmente ab. Es enthält ein regelbasiertes Konfigurationssystem zur Verwaltung von Stil-Presets, Layout-Regeln und Projekteinstellungen. Integrationsfähigkeiten umfassen die Überprüfung der Stileinhaltung für Continuous-Integration-Pipelines, Git-Hook-Automatisierung und editorbasierte Format-on-Save-Funktionalität.
Configurable formatter that reformats code to follow best practices.
isort is a Python import sorter and code formatter that organizes import statements into alphabetical groups and sections. It functions as both a utility to automatically rearrange imports for a consistent layout and as a linting tool to verify if code follows specific ordering rules. The project provides configurable layout settings for indentation, wrapping modes, and section ordering to ensure compliance with project style guides and PEP 8. It allows for the exclusion of specific lines or files through inline comments and docstrings. The tool integrates into development workflows via IDE
Utility for automatically sorting and organizing import statements.
rustfmt is a Rust code formatter that operates as a Cargo subcommand, applying consistent formatting to Rust source files according to official style guidelines. It parses source code into a syntax tree, applies formatting rules to tree nodes, and pretty-prints the result back to text, with support for TOML-driven configuration that allows per-project style customization. The formatter is edition-aware, automatically selecting formatting rules based on the Rust edition specified in the project, and supports a style edition override that decouples formatting rules from the Rust edition used fo
Official Rust code formatter.
autopep8 is a Python static code styler and formatter designed to automatically rewrite source code to comply with the PEP 8 style guide. It functions as a recursive code cleaner that identifies and fixes indentation, whitespace, and syntax irregularities across entire projects. The tool performs structural refactoring using abstract syntax tree transformations to execute non-whitespace changes, such as shortening long lines and improving identity tests. It includes an aggressive refactoring mode for complex style violations and supports selective formatting via inline markers to disable chan
Automatically adjusts code to conform to PEP 8 standards.
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
Pluggable and configurable code formatting platform.
docformatter
Formats docstrings to adhere to PEP 257 guidelines.
Prettier Rust is an opinionated code formatter that autocorrects bad syntax.
Prettier plugin for formatting Rust code.