Skip to content

Extra rubocop offenses when running rubocop on ruby/spec #2539

@eregon

Description

@eregon

From rubocop/rubocop#12724 (comment)
I noticed there are 3 more offenses when running with ParserEngine: parser_prism:

core/objectspace/define_finalizer_spec.rb:166:1: W: Lint/ImplicitStringConcatenation: Combine  and  into a single string literal, rather than using implicit string concatenation.
    RUBY

language/fixtures/bytes_magic_comment.rb:2:26: F: Lint/Syntax: invalid multibyte character 0xA0
(Using Ruby 3.3 parser; configure using TargetRubyVersion parameter, under AllCops)
$magic_comment_result = '你好'.bytes.inspect
                         ^^
language/fixtures/bytes_magic_comment.rb:2:27: F: Lint/Syntax: invalid multibyte character 0xBD
(Using Ruby 3.3 parser; configure using TargetRubyVersion parameter, under AllCops)
$magic_comment_result = '你好'.bytes.inspect
                           ^^

I guess there are due to some differences between parser gem and Prism::Translation::Parser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrubocopErrors that affect Rubocop use of Prism

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions