RuboCop is a Ruby static code analyzer and formatter based around conventions from the community Ruby Style Guide. It checks source code for style, layout and programming issues while also providing formatting and automatic correction facilities.
The tool is highly configurable, making it suitable for projects that want to follow RuboCop’s defaults as well as teams with their own established coding conventions. Its large ecosystem of extensions also allows specialised checks to be added for frameworks, testing tools and other areas of Ruby development.
This is free and open source software.
Key Features
- Checks Ruby code using an extensive collection of cops covering layout, linting, naming, metrics, security, style and other categories.
- Automatically corrects many detected offences, with a distinction between safe and potentially unsafe corrections.
- Includes code-formatting functionality as part of the same analysis workflow.
- Provides a built-in Language Server Protocol server for editor and IDE integration.
- Offers extensive project configuration, including per-file settings and the ability to disable individual cops for selected parts of source files.
- Can inspect only files changed in Git, which is useful when introducing checks to large or established repositories.
- Can preview autocorrections as a diff without modifying source files.
- Supports multiple reporting formats, including output designed for terminals, automated tooling and SARIF-compatible code scanning systems.
- Can be extended with custom cops and formatters and has a substantial ecosystem of extensions for Rails, RSpec, performance analysis and other Ruby tooling.
- Supports the major Ruby implementations and integrates with a wide selection of editors and development environments.
Website: github.com/rubocop/rubocop
Support:
Developer: Bozhidar Batsov
License: MIT License
RuboCop is written in Ruby. Learn Ruby with our recommended free books and free tutorials.
Related Software
| Ruby Linters | |
|---|---|
| RuboCop | Ruby static code analyzer and formatter |
| Reek | Examines Ruby classes, modules, and methods |
| Standard Ruby | Provides an opinionated, unconfigurable ruleset |
| HAML-Lint | Ruby-based linter for HAML templates |
| Slim-Lint | Configurable tool for analyzing Slim templates |
| ERB Lint | Lint your ERB or HTML files |
| YARD-Lint | For Ruby and Ruby on Rails projects that lint YARD documentation |
| oxicop | Fast Ruby linter |
Read our verdict in the software roundup.
| Ruby Code Formatters | |
|---|---|
| RuboCop | Checks style, detects potential problems, and autocorrects offences |
| Standard Ruby | Combines linting and automatic fixes with a shared set of rules |
| rubyfmt | Applies a consistent style with minimal configuration required |
| Syntax Tree | Toolkit for parsing, inspecting, and transforming source files |
| Rufo | Keeps source files tidy with an opinionated approach to style |
| alofmt | Delivers fast, deterministic formatting for consistent results |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.