Out of nowhere, Rubocop is complaining about classes that are not calling super.
W: Lint/MissingSuper: Call `super` to initialize state of the parent class. Example:
# frozen_string_literal: true class ApplicationService class << self def call(*args) new(*args).call end end def initialize(_args) raise NotImplementedError end def call raise NotImplementedError end end class SampleService < ApplicationService def initialize(something) @something = something end def call # do something end private # remaining methods end I have ApplicationService just as a way to easily call a service with: SampleService.call(arguments).
1 Answer
For the services you could set in .rubocop.yml:
Lint/MissingSuper: Exclude: - 'app/services/**/*' source: Recommend calling super in initialize
1