# airbnb/ruby

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/airbnb-ruby).**

3,890 stars · 756 forks · Ruby · MIT

## Links

- GitHub: https://github.com/airbnb/ruby
- awesome-repositories: https://awesome-repositories.com/repository/airbnb-ruby.md

## Description

This project provides a collection of coding standard specifications, style guides, and configuration assets used to define automated rules for static code analysis in Ruby. It serves as a centralized set of RuboCop configurations and static analysis rules to ensure consistent syntax and idiomatic usage across a codebase.

The project establishes a comprehensive Ruby style guide that defines naming conventions, indentation, and structural requirements. It utilizes a pluggable linting engine to enforce these standards through a defined set of patterns and constraints.

The capability surface covers code quality and linting, including the standardization of formatting, naming conventions, and documentation practices. It also incorporates architectural validation through abstract syntax tree pattern matching and the implementation of custom rules to detect non-compliant patterns.

## Tags

### Development Tools & Productivity

- [Ruby Linting Rules](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-analysis-rules/framework-linting-rules/ruby-linting-rules.md) — Implements a comprehensive set of static analysis rules specifically designed for the Ruby language.
- [AST Pattern Matching](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/ast-pattern-matching.md) — Implements structural code analysis using abstract syntax trees to identify violations regardless of whitespace.
- [Static Analysis Rules](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-analysis-rules.md) — Implements a defined set of patterns and constraints to enforce architectural standards and idiomatic Ruby usage.
- [Ruby Style Enforcement](https://awesome-repositories.com/f/development-tools-productivity/ruby-style-enforcement.md) — Provides a comprehensive set of tools and guidelines for applying uniform style and linting across Ruby projects. ([source](https://github.com/airbnb/ruby/tree/main/rubocop-airbnb))
- [Static Code Analysis](https://awesome-repositories.com/f/development-tools-productivity/static-code-analysis.md) — Provides tools for scanning Ruby source code to detect linting violations and syntax errors without execution.
- [Custom Lint Rule Definitions](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-analysis-rules/framework-linting-rules/core-rule-extensions/custom-lint-rule-plugins/custom-lint-rule-definitions.md) — Provides interfaces for defining prohibited code patterns and custom rules to enforce team-specific standards. ([source](https://github.com/airbnb/ruby/tree/main/rubocop-airbnb))

### Software Engineering & Architecture

- [Linting Engines](https://awesome-repositories.com/f/software-engineering-architecture/syntax-tree-analysis/declarative-pattern-matching/linting-engines.md) — Provides a pluggable static analysis engine that evaluates Ruby source code against predefined style and syntax rules.
- [Code Formatting Standards](https://awesome-repositories.com/f/software-engineering-architecture/code-formatting-standards.md) — Defines consistent rules for indentation, whitespace, and newline usage to maintain uniform visual structure. ([source](https://github.com/airbnb/ruby#readme))
- [Code Style Guides](https://awesome-repositories.com/f/software-engineering-architecture/code-style-guides.md) — Ships a comprehensive style guide defining naming and formatting standards for consistent Ruby source code.
- [Coding Convention Specifications](https://awesome-repositories.com/f/software-engineering-architecture/coding-convention-specifications.md) — Defines formal coding convention specifications for naming, indentation, and structural requirements.
- [Coding Standards](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards.md) — Provides a curated collection of language conventions and formatting rules to ensure long-term maintainability. ([source](https://github.com/airbnb/ruby/blob/main/README.md))
- [Naming Conventions](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards/naming-conventions.md) — Establishes standardized naming patterns and casing rules for variables, classes, and methods. ([source](https://github.com/airbnb/ruby/blob/main/README.md))
- [Ruby Documentation Standards](https://awesome-repositories.com/f/software-engineering-architecture/documentation-governance-frameworks/ruby-documentation-standards.md) — Defines mandatory commenting patterns and documentation requirements for Ruby classes and methods.
- [Naming Conventions](https://awesome-repositories.com/f/software-engineering-architecture/naming-conventions.md) — Provides standardized rules for naming identifiers and formatting layout, including predicate method suffixes. ([source](https://github.com/airbnb/ruby#readme))
- [Configuration-Driven Rules](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/configuration-driven-rules.md) — Uses YAML configuration files to define and enforce project-wide coding standards and formatting rules.
- [Linting Rule Configurations](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/configuration-driven-rules/linting-rule-configurations.md) — Provides a collection of configuration settings that define which RuboCop syntax checks are applied.
- [Documentation Standards](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards/documentation-standards.md) — Mandates specific formal specifications for structuring documentation comments within Ruby source code. ([source](https://github.com/airbnb/ruby/blob/main/README.md))
- [Documentation Standards](https://awesome-repositories.com/f/software-engineering-architecture/documentation-standards.md) — RuboCop sets requirements for class, file, and function level comments to ensure code remains maintainable for future contributors. ([source](https://github.com/airbnb/ruby#readme))
- [Error Handling Misuse](https://awesome-repositories.com/f/software-engineering-architecture/error-handling-misuse.md) — Provides guidelines to prevent the use of exceptions for normal control flow, improving application stability. ([source](https://github.com/airbnb/ruby#readme))
- [Predicate Naming Constraints](https://awesome-repositories.com/f/software-engineering-architecture/naming-conventions/architecture-based-naming-enforcements/predicate-naming-constraints.md) — Enforces semantic meaning in method names by requiring specific character suffixes for boolean returning functions.
- [Linter Cop Implementations](https://awesome-repositories.com/f/software-engineering-architecture/pattern-matching-implementations/linter-cop-implementations.md) — Provides the ability to extend the base linter with custom pattern-matching logic for idiomatic Ruby detection.
- [Collection Usage Standardization](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/codebase-standardization/collection-usage-standardization.md) — Defines preferred methods for manipulating arrays and hashes to ensure consistency and performance across the codebase. ([source](https://github.com/airbnb/ruby#readme))
- [Line Length Limits](https://awesome-repositories.com/f/software-engineering-architecture/source-file-organization/file-length-limits/line-length-limits.md) — Restricts the maximum number of characters allowed per line to maintain visual readability. ([source](https://github.com/airbnb/ruby/blob/main/rationales.md))
- [Syntax Verbosity Optimization](https://awesome-repositories.com/f/software-engineering-architecture/syntax-verbosity-optimization.md) — Provides guidelines and automated rules for reducing boilerplate and redundant syntax to improve Ruby code maintainability. ([source](https://github.com/airbnb/ruby#readme))

### Programming Languages & Runtimes

- [Idiomatic Patterns](https://awesome-repositories.com/f/programming-languages-runtimes/python-language-features/idiomatic-patterns.md) — Promotes the use of idiomatic Ruby patterns and method preferences to improve performance and clarity. ([source](https://github.com/airbnb/ruby/blob/main/README.md))
- [Ruby Code Standardization](https://awesome-repositories.com/f/programming-languages-runtimes/ruby-code-standardization.md) — Establishes consistent formatting and structural rules specifically tailored for the Ruby language. ([source](https://github.com/airbnb/ruby#readme))

### Testing & Quality Assurance

- [Static Code Analysis](https://awesome-repositories.com/f/testing-quality-assurance/static-code-analysis.md) — Automates the scanning of source code to ensure adherence to architectural and formatting standards without execution.
- [Framework Implementation Validation](https://awesome-repositories.com/f/testing-quality-assurance/implementation-pattern-validation/framework-implementation-validation.md) — Implements specific formatting and structural requirements for Rails data scopes and controller responses. ([source](https://github.com/airbnb/ruby/blob/main/README.md))

### Part of an Awesome List

- [Code Quality and Patterns](https://awesome-repositories.com/f/awesome-lists/devtools/code-quality-and-patterns.md) — Standardized style guide for writing Ruby code.
- [Coding Standards](https://awesome-repositories.com/f/awesome-lists/devtools/coding-standards.md) — A Ruby style guide by Airbnb.
- [Programming Language Standards](https://awesome-repositories.com/f/awesome-lists/devtools/programming-language-standards.md) — Airbnb's internal Ruby style guide.
