rubocop-hq/rubocop

View on GitHub
docs/modules/ROOT/pages/compatibility.adoc

Summary

Maintainability
Test Coverage
= Compatibility

RuboCop targets Ruby 2.0+ code analysis.footnote:[As defined by its reference implementation MRI.]

RuboCop officially runtime supports MRI (a.k.a. CRuby) and JRuby.

- MRI 2.7+
- JRuby 9.4+

The oldest supported JRuby version is derived from the oldest compatible MRI version.

NOTE: RuboCop might be working with other Ruby implementations as well, but it's tested only on MRI and JRuby.

== Support Matrix

RuboCop generally aims to follow MRI's own support policy - meaning RuboCop would support all officially supported MRI releases.footnote:[Typically the last 3 releases.] To give people extra time for a smooth transition, we've customarily provided support for about one year after EOL of MRI version. footnote:[At the core team's discretion this policy might be waived aside for MRI releases causing significant maintenance overhead.]

NOTE: There are major version incompatibilities between Ruby 2.7 and Ruby 3.0, and the latest stable version of Ruby on Rails, 7.1, still supports Ruby 2.7. Therefore, it might be early for RuboCop to drop support for Ruby 2.7 at this stage. As long as Rails 7.1 is in the "Bug Fix" phase of the https://guides.rubyonrails.org/maintenance_policy.html[Maintenance Policy for Ruby on Rails], RuboCop will continue supporting Ruby 2.7.

The following table is the runtime support matrix.

|===
| Supported runtime Ruby version | Last supported RuboCop version

| 1.9 | 0.41
| 2.0 | 0.50
| 2.1 | 0.57
| 2.2 | 0.68
| 2.3 | 0.81
| 2.4 | 1.12
| 2.5 | 1.28
| 2.6 | 1.50
| 2.7 | -
| 3.0 | -
| 3.1 | -
| 3.2 | -
| 3.3 | -
| 3.4 (experimental) | -
|===

RuboCop targets Ruby 2.0+ code analysis with Parser gem as a parser since RuboCop 1.30. It restored code analysis support that had been removed earlier by mistake, together with dropping runtime support for unsupported Ruby versions.

Starting from RuboCop 1.62, support for Prism's `Prism::Translation::parser` will enable analysis of Ruby 3.3+. For more details, please refer to the xref:configuration.adoc#setting-the-parser-engine[setting `ParserEngine`].

NOTE: The compatibility xref:configuration.adoc#setting-the-target-ruby-version[setting `TargetRubyVersion`] is about code analysis (what RuboCop can analyze), not runtime (is RuboCop capable of running on some Ruby or not).

== Forward Compatibility

Features may be provided for development version of Ruby. These are all considered experimental, and may change before the stable version of Ruby will be released.