30 open-source projects similar to google/google-java-format, ranked by how many features they have in common. Compare stars, activity and what each one does to find the best Google Java Format alternative.
gofumpt is a Go language tool and source code formatter. It functions as an opinionated code styler that applies a strict and consistent visual style to Go source files to ensure a standardized appearance across a codebase. The tool enforces a more rigid and deterministic set of layout constraints than the standard Go toolchain. It is designed for Go project style enforcement to eliminate trivial diffs and stylistic inconsistencies. The project supports Go source code formatting and continuous integration linting to automatically check and correct formatting during the build process.
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
pycodestyle is a Python code quality utility that checks source files against the PEP 8 style guide, reporting deviations as a static analysis tool. Its primary function is to enforce consistent code formatting by scanning files and flagging violations with precise line and column numbers for direct integration into editors or workflows. The tool combines token-based pattern matching with abstract syntax tree (AST) context enrichment, enabling it to evaluate both surface-level formatting and deeper structural patterns. Its architecture supports custom validation rules through a plugin interfa
node-jscs is a JavaScript linter and code style checker designed to analyze source code and enforce consistent coding standards. It functions as a static analysis tool that identifies patterns in JavaScript code to ensure adherence to defined style guides. The project provides capabilities for both JavaScript code linting and automated code formatting. It can check source code for style violations and automatically correct those errors to align the codebase with a specified set of formatting rules.
OpenRewrite is an automated refactoring engine and source-to-source migration framework. It uses a lossless semantic tree parser to represent source code as type-aware trees that preserve original whitespace and formatting, enabling precise and deterministic modifications. The project utilizes a declarative refactoring pipeline where sequences of transformations are defined in YAML to resolve breaking changes and technical debt. It features type-aware pattern matching and cross-language model mapping to apply similar refactoring patterns across different programming languages. The framework
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
YAPF is a Python code formatter and style compliance tool. It operates as an AST-based reformatter that uses concrete syntax trees to ensure structural consistency and a uniform visual presentation across source files. The engine utilizes a penalty-based layout optimizer to determine the best line breaks by calculating numerical costs for different formatting choices. It employs a multi-process code processor to distribute the formatting of multiple files across several CPU cores. The tool covers source code reformatting through in-place file modifications, difference analysis, and the proce
PHP-Parser is a tool that converts PHP source code into an abstract syntax tree for static analysis and programmatic manipulation. It functions as a parser, a code generator, and a static analysis framework. The project enables the programmatic construction of abstract syntax tree nodes through a fluent interface and provides the ability to transform these trees back into formatted source code. It includes a serializer that exports abstract syntax trees to JSON format and reconstructs them from strings. The toolset covers several capability areas, including namespace resolution, constant exp
Standard is a suite of static analysis tools for JavaScript, comprising a linter, formatter, and a predefined style guide. It functions as a static code analyzer that scans source code for style violations and potential errors without executing the program. The project provides an automatic code fixer that rewrites source code to resolve formatting issues and enforce syntax consistency. It implements a standardized set of rules for JavaScript formatting and syntax to ensure a uniform appearance across different projects. The system covers a wide range of static analysis capabilities, includi
Standard is a zero-configuration static analyzer, linter, and formatter for JavaScript. It functions as a style guide that enforces consistent coding rules and identifies programming errors without requiring manual configuration files. The tool distinguishes itself by providing an automatic code fixer that scans source files to correct style violations and ensure a uniform codebase. It implements a predefined rule set to eliminate the need for project-specific configuration. The project covers a broad range of static analysis capabilities, including support for experimental language syntax a
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
RuboCop is a static code analyzer, linter, and formatter for the Ruby language. It detects style violations, potential bugs, and code smells by scanning source code without executing the program. The tool enforces a predefined Ruby style guide by flagging deviations and automatically rewriting source code to ensure consistency across projects. It includes a language server that provides real-time analysis and formatting suggestions directly within text editors.
GritQL is an AST-based code transformation engine and structural search tool. It uses a declarative query language to identify and rewrite source code patterns across multiple programming languages by matching abstract syntax tree nodes rather than literal text. The system functions as an automated refactoring framework for large-scale migrations and API updates. It distinguishes itself by utilizing sequential transformation pipelines and reusable blueprints that can be synced between local environments and remote repositories. The tool covers a broad range of capabilities including static a
RuboCop is a static code analyzer and linter for Ruby. It functions as a static analysis tool designed to detect potential bugs, identify style violations, and improve overall code quality in Ruby projects. The project provides an automated code formatter that rewrites source code to align with established community standards. It also implements a language server protocol to surface linting and formatting errors directly within text editors. Its capabilities cover automated code linting and the analysis of Ruby code style to ensure consistency across a project. These functions are driven by
This project is a comprehensive collection of Python programming education materials, including tutorials, exercises, and curated code samples. It serves as a learning curriculum and software engineering toolkit, utilizing Jupyter Notebooks to combine executable code with descriptive educational text. The repository provides practical implementation guides for building large language model applications, such as retrieval-augmented generation systems, stateful AI agents, and machine learning workflows. It distinguishes itself by offering a structured approach to agentic coding workflows, cover
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
syn is a Rust syntax tree parser and token stream converter. It serves as a toolkit for procedural macro development, providing a framework to parse Rust source code into structured syntax trees for analysis and transformation. The project enables the manipulation of Rust abstract syntax trees through specialized visitor and folder patterns for traversing and mutating nodes. It provides a bidirectional mapping that allows developers to convert token streams into structured trees and print those trees back into tokens for code generation. The library covers a broad range of syntax analysis ca
This tool is a command-line utility designed to automatically detect and correct coding standard violations in PHP source files. It functions as a static analysis and refactoring engine that ensures consistent project-wide formatting by applying predefined community conventions or custom organizational rules. The project distinguishes itself through a modular rule-based engine that supports both automated style correction and codebase modernization. It allows developers to update legacy syntax to align with newer language versions and testing framework requirements, facilitating the adoption
Checkstyle is a Java static analysis tool and linter designed to identify and enforce coding standards and best practices. It functions as a code quality auditor and Javadoc validation tool, checking source code against configurable rulesets to ensure structural and stylistic consistency. The project allows for the creation of custom linting rules by extending a core API to inspect the abstract syntax tree. It further enables specialized validation through the use of XPath expressions to query the syntax tree for specific code patterns and violations. Capability areas include the enforcement
Recast is a JavaScript AST parser and printer designed for automated code refactoring. It converts source code into abstract syntax trees that can be modified and then printed back into source code. The project focuses on formatting-preserving transformations, storing original whitespace and indentation metadata within syntax tree nodes to reconstruct code without losing its original layout. It also generates character-level source maps to maintain precise correspondences between original input and transformed output. The toolkit includes utilities for syntax tree manipulation using a visito
ansible-lint is a static code analysis tool and linter designed to identify syntax errors and best practice violations within Ansible playbooks and roles. It functions as a quality gate for automation pipelines, scanning configuration files and scripts without executing the code to ensure reliability and consistency. The project distinguishes itself by acting as an automated code formatter that can correct identified linting issues and reformat files to meet community standards. It also serves as a dependency manager, automatically detecting and installing required roles and collections from
This project is a comprehensive, curated directory of static analysis, linting, and security scanning utilities. It serves as a central resource for developers to discover, compare, and select tools based on specific programming languages, licensing models, and integration requirements. The directory distinguishes itself by providing deep metadata for each listed utility, including community-driven popularity rankings, maintenance status, and deployment methods. By aggregating these tools into a single searchable index, it enables teams to identify solutions for enforcing coding standards, ma
Reek is a static code analyzer for Ruby projects designed to identify design flaws and maintainability issues known as code smells. It functions as a quality assurance tool that inspects source code without executing it to find structural weaknesses and architectural debt. The analyzer identifies specific patterns such as large classes, long methods, and uncommunicative naming. It also detects more complex design issues, including feature envy, data clumps, simulated polymorphism, and control coupling. The tool includes capabilities for issue baselining to manage legacy code and configuratio
go-tools is a collection of utilities for Go static analysis and memory layout optimization. It provides a toolset designed to analyze source code to detect bugs and dead code, alongside specialized tools for optimizing how structs are arranged in memory. The project includes a memory alignment visualizer to display physical memory layouts and padding, as well as a struct layout optimizer that reorders fields to minimize memory padding. Additionally, it provides a boilerplate generator to automate the creation of registration and test files required for developing custom Go analyzers. The to
Prettier is an opinionated code formatter that parses source code and reprints it from scratch to enforce a consistent, project-wide visual style. By transforming code into an abstract syntax tree and applying a recursive document printing process, it eliminates manual style debates and ensures that all source files adhere to a unified appearance. The project is distinguished by its extensible, plugin-based architecture, which decouples language-specific parsing logic from the core engine. This modular design allows for uniform style enforcement across diverse programming languages and comple
swift-format is a set of developer utilities for the Swift ecosystem designed for automated style enforcement, static analysis, and project-wide configuration management. It functions as a code formatter that rewrites source code to adhere to consistent style rules and as a linter that identifies style violations. The tool provides a system for defining and applying custom formatting rules through a configuration tool. This includes the ability to load settings from configuration files discovered in a directory hierarchy or to export default settings for user customization. Its capabilities
vim-lsp is a Vim plugin that implements the Language Server Protocol to provide an asynchronous code intelligence tool for the editor. It serves as a bridge between Vim and external language servers, providing semantic code analysis and IDE-like navigation and diagnostics. The project provides a refactoring interface for renaming symbols across a workspace and applying quick-fixes. It also enables semantic highlighting, which color-codes elements based on their meaning as determined by the language server. The plugin covers a broad surface of capabilities, including symbol navigation and dis
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
This project provides a collection of reference materials, guides, and cheatsheets designed to optimize the Android development workflow. It serves as a comprehensive resource for implementing best practices in application building, debugging, and user interface design. The repository covers specialized techniques for build optimization, including methods to reduce binary sizes and accelerate compilation. It also provides detailed references for device debugging, memory leak detection, and the application of Material Design principles. The project further details productivity enhancements fo
Black is a deterministic Python code formatter and style guide enforcer. It automatically reformats source code and Jupyter notebook cells into a consistent style to eliminate manual debates over code layout and reduce noise in version control diffs. The tool uses abstract syntax tree analysis to restructure code layout while ensuring that the underlying functional logic remains unchanged. It employs a deterministic engine that produces a single consistent output for any given input, removing subjective styling choices. The system provides capabilities for in-place file mutation, automated s