# rubocop/rubocop

**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/rubocop-rubocop).**

12,879 stars · 3,113 forks · Ruby · MIT

## Links

- GitHub: https://github.com/rubocop/rubocop
- Homepage: https://docs.rubocop.org
- awesome-repositories: https://awesome-repositories.com/repository/rubocop-rubocop.md

## Topics

`code-formatter` `hacktoberfest` `linter` `rubocop` `ruby` `static-code-analysis`

## Description

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 suggest alternative phrasing. It includes a configuration system for managing rule activation, file exclusions, and the generation of todo lists to track existing offenses for incremental cleanup.

## Tags

### Part of an Awesome List

- [Ruby Linters](https://awesome-repositories.com/f/awesome-lists/devtools/ruby-extensions/ruby-linting-tools/ruby-linters.md) — Functions as a comprehensive Ruby linter that identifies smells and errors to ensure maintainability.

### Development Tools & Productivity

- [Automated Linting Integrations](https://awesome-repositories.com/f/development-tools-productivity/automated-linting-integrations.md) — Provides automated style and syntax checks integrated into the development workflow to ensure code quality.
- [Source Code Rewriting](https://awesome-repositories.com/f/development-tools-productivity/ast-transformation-tools/ast-to-source-conversion/source-code-rewriting.md) — Automatically rewrites Ruby source files to correct stylistic violations based on precise AST node coordinates.
- [Automatic Code Formatters](https://awesome-repositories.com/f/development-tools-productivity/automatic-code-formatters.md) — Automatically rewrites Ruby source code to adhere to defined stylistic and syntactic formatting standards.
- [Static Code Analyzers](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-code-analyzers.md) — Scans Ruby source code for style violations and complexity issues using automated linting.
- [Rule Activation Controls](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/rule-activation-controls.md) — Offers mechanisms to toggle whether specific linting rules are enabled or disabled by default. ([source](https://github.com/rubocop/rubocop/blob/master/config/default.yml))
- [Compliance Registries](https://awesome-repositories.com/f/development-tools-productivity/configuration-generators/configuration-file-generators/compliance-registries.md) — Generates configuration files that record existing violations to facilitate incremental codebase cleanup. ([source](https://github.com/rubocop/rubocop/blob/master/.rubocop_todo.yml))
- [Language Server Protocols](https://awesome-repositories.com/f/development-tools-productivity/language-server-protocols.md) — Implements the Language Server Protocol to communicate analysis results and suggested fixes to editors in real-time.
- [Language Servers](https://awesome-repositories.com/f/development-tools-productivity/language-servers.md) — Implements a language server that surfaces style violations and suggested fixes directly within supported code editors.

### Programming Languages & Runtimes

- [Ruby Code Standardization](https://awesome-repositories.com/f/programming-languages-runtimes/ruby-code-standardization.md) — Automatically rewrites Ruby source code to ensure consistent indentation, spacing, and stylistic standards.

### Software Engineering & Architecture

- [Code Style Guides](https://awesome-repositories.com/f/software-engineering-architecture/code-style-guides.md) — Allows defining specific linting rules and naming conventions to ensure adherence to project or community style guides. ([source](https://github.com/rubocop/rubocop/blob/master/.rubocop.yml))
- [Style Guide Enforcers](https://awesome-repositories.com/f/software-engineering-architecture/style-guide-enforcers.md) — Automatically enforces a strict community standard of Ruby code style to eliminate manual debates.
- [Code Complexity Metrics](https://awesome-repositories.com/f/software-engineering-architecture/code-complexity-metrics.md) — Monitors the length of blocks, classes, and modules to prevent the creation of overly complex code structures. ([source](https://github.com/rubocop/rubocop/blob/master/.rubocop.yml))
- [Rule Configuration Engines](https://awesome-repositories.com/f/software-engineering-architecture/rule-configuration-engines.md) — Implements a system for managing and customizing the activation and parameters of diagnostic and stylistic rules via YAML.
- [Technical Debt Registries](https://awesome-repositories.com/f/software-engineering-architecture/technical-debt-registries.md) — Generates a registry of existing offenses to track and ignore legacy debt while enforcing rules on new code.

### Testing & Quality Assurance

- [Static Code Analysis](https://awesome-repositories.com/f/testing-quality-assurance/static-code-analysis.md) — Provides automated scanning of Ruby source code to detect style and maintainability issues without executing the program.
