Unconfigurable Ruby linter and formatter built on RuboCop
open sourceMITfree
Standard Ruby (the standard gem) brings StandardJS's approach to Ruby: a linter and formatter built on RuboCop with one fixed configuration of RuboCop's built-in rules and rubocop-performance's, so a team stops arguing about style. It fixes what it can automatically, runs in editors and CI, includes a language server (standardrb --lsp) and a Ruby LSP add-on, and supports plugins built with lint_roller such as standard-rails and standard-sorbet. Test Double maintains it and updates its rules each month as RuboCop adds new ones.
Problems it solves
- stop my team arguing about Ruby style rules in code review
- lint and auto-format a Ruby project without writing a RuboCop config
- get the same Ruby formatting in every editor and in CI
Features
- one fixed configuration of RuboCop's and rubocop-performance's rules
- automatic fixes
- language server (standardrb --lsp) and a Ruby LSP add-on
- plugins built with lint_roller, such as standard-rails and standard-sorbet
- editor and CI integrations
Limitations
- Its rule set can't be configured: you use Standard's rules as they are or not at all.1
Alternatives
The same job
These do what Standard Ruby does.
- RuboCop A Ruby static code analyzer and formatter, based on the community Ruby style guide.
- RuboCop Rails RuboCop extension with cops for Rails best practices and conventions
- RuboCop Rake RuboCop plugin with cops for Rake task files
- RuboCop RSpec RuboCop extension with cops for RSpec test files
- rubocop-require_tools RuboCop extension that flags missing require statements
- RuboCop Performance Performance optimization analysis for Ruby code, as a RuboCop extension
