Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start Solargraph: Error: [NoMethodError] private method 'select' called for nil:NilClass #235

Open
jramiresbrito opened this issue Nov 21, 2021 · 1 comment

Comments

@jramiresbrito
Copy link

Environment

OS: Ubuntu 20.04.3 LTS (Focal Fossa)
Ruby: ruby 2.7.4p191
Solargraph: solargraph (0.44.1)
Rubocop: rubocop (1.23.0)

When I open my project in VsCode, the warning starts:

Failed to start Solargraph: Error: [NoMethodError] private method `select' called for nil:NilClass

Here are my Rubocop and Solargraph .yml files:

.rubocop.yml

Layout/LineLength:
  Max: 120
Layout/EmptyLines:
  Enabled: false
Metrics/ClassLength:
  Max: 150
Metrics/BlockLength:
  Max: 50
Metrics/MethodLength:
  Max: 25
Metrics/AbcSize:
  Enabled: false
Metrics/CyclomaticComplexity:
  Enabled: false
Style/FrozenStringLiteralComment:
  Enabled: false
Style/ConditionalAssignment:
  Enabled: false
Style/StringLiterals:
  Enabled: false
Style/RedundantReturn:
  Enabled: false
Style/SelfAssignment:
  Enabled: false
Style/Documentation:
  Enabled: false
Style/RegexpLiteral:
  Enabled: false
Style/GuardClause:
  Enabled: false
Style/WordArray:
  Enabled: false
Style/SymbolProc:
  Enabled: false
Style/MutableConstant:
  Enabled: false
Style/SignalException:
  Enabled: false
Style/MissingRespondToMissing:
  Enabled: false
Style/HashEachMethods:
  Enabled: false
Style/HashTransformKeys:
  Enabled: false
Style/HashTransformValues:
  Enabled: false
Style/ClassAndModuleChildren:
  EnforcedStyle: compact
Style/ClassAndModuleChildren:
  Enabled: false
Lint/MissingSuper:
  Enabled: false
Lint/UnusedMethodArgument:
  Enabled: false
Security/Open:
  Enabled: false
Bundler/OrderedGems:
  Enabled: false
Lint/RaiseException:
  Enabled: false
Lint/StructNewOverride:
  Enabled: false

AllCops:
  NewCops: enable
  TargetRubyVersion: 2.7.4
  Exclude:

.solargraph.yml

---
include:
- 'app/**/*.rb'
exclude:
reporters:
- rubocop
max_files: 5000
@castwide
Copy link
Owner

The exclude setting in .solargraph.yml should either contain a list of values or be deleted altogether. An empty array is acceptable:

exclude: []

I'll look into a more graceful way of handling errors in config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants