Skip to content

A couple of issues I saw with strict type check #126

@ShadiestGoat

Description

@ShadiestGoat

I have a big rails 5 project that I ran strict type checker with the latest version of solargraph-rails (master branch). Here are the things I noticed that should be fixed (I can work on some of them):

  • logger isn't inherited into at least models (Rails.logger is defined though)
  • Model.new is interpreted as Class#new, and it reports arity problems
  • before_update, before_save, before_validation are not defined
  • unresolved call to try
  • reload doesn't return self
  • unresolved constant Base64
  • validates_with, validates, validates_uniqueness_of are not defined
  • write_attribute, read_attribute & update_attributes are not defined
  • unresolved call to config:
module MyApp
   class  Application < Rails:: Application
      config.load_defaults 5.2
      config.my_value = 123456
   end
end

Both configs are unresolved.

  • (kind of a stretch goal tbh) config doesn't have any auto complete -- it'd be nice to auto complete known values

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions