Skip to content

Commit 34ae2dc

Browse files
committed
RuboCop now uses prism as a first-class (translation) parser
Since rubocop 1.75 it just does the right thing, so no need to specifically call it out anymore.
1 parent 71432af commit 34ae2dc

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

docs/parser_translation.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,3 @@ All the parsers are autoloaded, so you don't have to worry about requiring them
2222

2323
If you also need to parse Ruby versions below 3.3 (which `prism` has no support for), check out
2424
[this guide](https://github.com/whitequark/parser/blob/master/doc/PRISM_TRANSLATION.md) from the `parser` gem on how to use both in conjunction.
25-
26-
### RuboCop
27-
28-
Prism as a parser engine is directly supported since RuboCop 1.62.
29-
30-
First, specify `prism` in your Gemfile:
31-
32-
```ruby
33-
gem "prism"
34-
```
35-
36-
To use Prism with RuboCop, specify `ParserEngine` and `TargetRubyVersion` in your RuboCop configuration file:
37-
38-
```yaml
39-
AllCops:
40-
ParserEngine: parser_prism
41-
TargetRubyVersion: 3.3
42-
```
43-
44-
The default value for `ParserEngine` is `parser_whitequark`, which indicates the Parser gem. You need to explicitly switch it to `parser_prism` to indicate Prism. Additionally, the value for `TargetRubyVersion` must be specified as `3.3` or higher, as Prism supports parsing versions of Ruby 3.3 and higher.
45-
The parser class is determined by the combination of values for `ParserEngine` and `TargetRubyVersion`. For example, if `TargetRubyVersion: 3.3`, parsing is performed by `Prism::Translation::Parser33`, and for `TargetRubyVersion 3.4`, parsing is performed by `Prism::Translation::Parser34`.
46-
47-
For further information, please refer to the RuboCop documentation:
48-
https://docs.rubocop.org/rubocop/configuration.html#setting-the-parser-engine

0 commit comments

Comments
 (0)