Proposal: Update rubocop and handles a new cop
Since v1.67.0, the AllowRBSInlineAnnotation config option has been added to the Layout/LeadingCommentSpace cop.
It is necessary to annotate types in Ruby code via RBS::Inline. RBS::Inline is a pilot project of ruby/rbs and is planned to be merged into ruby/rbs.
Could you update rubocop to v1.67.0 and enable the AllowRBSInlineAnnotation option, please?
I also see problems with the current 1.66 Rubocop version.
This is because of the latest update of psych.
Resulting in errors like An error occurred while Layout/FirstArgumentIndentation cop was inspecting
See: https://github.com/rubocop/rubocop/pull/11060#issuecomment-2467457040
This should be fixed when upgrading to 1.68.0 as this PR has made in to that version already: https://github.com/rubocop/rubocop/pull/13379
I added a PR updating to 1.68 already: https://github.com/standardrb/standard/pull/659
Another option is AllowSteepAnnotation, which also needs to be enabled. With Steep 1.9, empty arrays will trigger a warning like:
lib/meta_tags/text_normalizer.rb:195:102: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
â”” title = (title_limited_length > 0) ? truncate_array(title, title_limited_length, separator) : []
Standard will complain with
lib/meta_tags/text_normalizer.rb:162:19: Layout/LeadingCommentSpace: Missing space after `#`.
Looks like current option is to either ditch (somewhat) Standard, or Steep. https://github.com/kpumuk/meta-tags/pull/323
fixed by https://github.com/standardrb/standard/pull/709