Linters
What is Rubocop-compatible Standard Ruby? An introduction to Standard Ruby's linter and formatter for Ruby
Rubocop-compatible Standard Ruby is an unconfigurable linter and formatter for Ruby built on RuboCop. Standard brings the ethos of StandardJS to Ruby by applying a fixed configuration. It is aimed at Ruby developers and at teams that want to avoid linter configuration debates.
- Tool
- Rubocop-compatible Standard Ruby
- Made by
- Standard Ruby
- Official site
- github.com/standardrb/standard
- Category
- Linters
Who makes Rubocop-compatible Standard Ruby
Standard is created and maintained by the team at Test Double. The official website is the project's GitHub repository, linked below this page.
Official website: github.com/standardrb/standard
What Rubocop-compatible Standard Ruby is for
Standard applies a fixed configuration to RuboCop's built-in rules and the rubocop-performance rules. Its ruleset is deliberately not configurable, which is the point of the tool: there is nothing to tune and so nothing to argue about.
The configuration is updated for new RuboCop rules on a monthly release cadence, so the fixed ruleset still moves forward over time.
When code is compliant, Standard exits quietly with code 0. Most rules can be fixed automatically and safely, and some further rules can be auto-fixed with a risk of changing code behavior.
Who Rubocop-compatible Standard Ruby is for
The vendor names Ruby developers and teams wanting to avoid linter configuration debates. If a team would rather adopt one agreed set of rules than spend time deciding on its own, a fixed ruleset removes that decision.
Teams that need to customize individual rules will find the design restrictive, since the ruleset is not configurable. Exclusions are still possible: individual lines can be ignored with comment directives, and files and globs can be ignored through .standard.yml.
Notable capabilities
Standard is small in surface area but covers installation, command-line use, editors and extension. Its executable is named standardrb to distinguish it from StandardJS.
- Fixed ruleset: a fixed configuration of RuboCop's built-in rules and the rubocop-performance rules.
- Flexible installation: it installs as a gem or via a project Gemfile.
- Command line and Rake: it runs from the command line or as a Rake task.
- Automatic fixing: most rules can be fixed automatically and safely, while some further rules can be auto-fixed with a risk of changing code behavior.
- Ruby LSP add-on: it provides an add-on that loads automatically when the gem is in the Gemfile.
- Language server: an included executable is started with standardrb --lsp.
- Plugins: it supports plugins built with lint_roller.
- Targeted ignores: comment directives ignore individual lines, and .standard.yml ignores files and globs.
How Rubocop-compatible Standard Ruby fits linters
Among linters, Standard takes a different approach from tools that expose many options. It builds on RuboCop and its rules but removes configuration, combining linting and formatting under one fixed set of choices.
In Linthelm's wider niche of linters, static analysis and code quality, it suits codebases where consistency and low setup effort matter more than customization. It can run in the terminal, as a Rake task, or inside an editor through the Ruby LSP add-on or its language server, so the same rules apply wherever code is checked.
Frequently asked questions
What is Standard Ruby used for?
Standard is a linter and formatter for Ruby built on RuboCop. It applies a fixed configuration to RuboCop's built-in rules and the rubocop-performance rules.
Who develops Standard Ruby?
Standard is created and maintained by the team at Test Double. Its official website is https://github.com/standardrb/standard.
Can I configure Standard Ruby's rules?
No. Its ruleset is deliberately not configurable. You can ignore individual lines with comment directives, and ignore files and globs through .standard.yml.
Does Standard Ruby support editors?
Yes. It provides a Ruby LSP add-on that loads automatically when the gem is in the Gemfile, and a language server executable started with standardrb --lsp.
Does Standard Ruby fix code automatically?
Most rules can be fixed automatically and safely. Some further rules can be auto-fixed, but with a risk of changing code behavior.
Linthelm is independent and is not affiliated with Standard Ruby. Product names belong to their owners. Features change; confirm details on the official website.