castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
423 stars 25 forks source link

New rubocop's rules are not supported #183

Open zorar4ik opened 4 years ago

zorar4ik commented 4 years ago

I can't start solargraph server if my .rubocop.yml includes these lines:

Layout/EmptyLinesAroundAttributeAccessor:
  Enabled: true
Layout/SpaceAroundMethodCallOperator:
  Enabled: true
Lint/DeprecatedOpenSSLConstant:
  Enabled: true
Lint/MixedRegexpCaptureTypes:
  Enabled: true
Lint/RaiseException:
  Enabled: true
Lint/StructNewOverride:
  Enabled: true
Style/ExponentialNotation:
  Enabled: false
Style/RedundantFetchBlock:
  Enabled: true
Style/RedundantRegexpCharacterClass:
  Enabled: true
Style/RedundantRegexpEscape:
  Enabled: true
Style/SlicingWithRange:
  Enabled: true
Style/AccessorGrouping:
  Enabled: true
Style/BisectedAttrAccessor:
  Enabled: true
Style/RedundantAssignment:
  Enabled: true
Performance/AncestorsInclude:
  Enabled: true
Performance/BigDecimalWithNumericArgument:
  Enabled: true
Performance/RedundantSortBlock:
  Enabled: true
Performance/RedundantStringChars:
  Enabled: true
Performance/ReverseFirst:
  Enabled: true
Performance/SortReverse:
  Enabled: true
Performance/Squeeze:
  Enabled: true
Performance/StringInclude:
  Enabled: true

It says can't start solargraph server, unrecognised cops. These rules were introduced few days ago in rubocop version 0.87.0

Is there a way to include these cops and start solargraph at the same time or it is impossible for now?

P.S My solargraph extension is v0.21.1, solargraph gem version 0.39.11. Thanks!

castwide commented 4 years ago

The problem appears to be related to extensions, in this case the rubocop-performance extension. I got the same errors despite adding rubocop-performance to the Gemfile and require: rubocop-performance to the .rubocop.yml configuration in your post. Not sure what needs to be done here, but I'm looking into it.