standardrb/standard · error

Plugin `#{plugin.about&.name || plugin.inspect}' failed to l

Error message

Plugin `#{plugin.about&.name || plugin.inspect}' failed to load with error: #{rules.value.respond_to?(:message) ? rules.value.message : rules.value}

What it means

Error "Plugin `#{plugin.about&.name || plugin.inspect}' failed to load with error: #{rules.value.respond_to?(:message) ? rules.value.message : rules.value}" thrown in standardrb/standard.

Source

Thrown at lib/standard/plugin/merges_plugins_into_rubocop_config.rb:65

              all_cop_keys_configured_by_plugins
            )
            delete_already_configured_keys!(combined_config.keys, next_config, dont_delete_keys: ["AllCops"])

            RuboCop::ConfigLoader.merge_with_default(next_config, path, unset_nil: false)
          end
        end
      end

      def config_for_plugin(plugin, runner_context)
        rules = plugin.rules(runner_context)

        if rules.type == :path
          [RuboCop::ConfigLoader.load_file(rules.value), rules.value]
        elsif rules.type == :object
          path = plugin.method(:rules).source_location[0]
          [RuboCop::Config.create(rules.value, path, check: true), path]
        elsif rules.type == :error
          raise "Plugin `#{plugin.about&.name || plugin.inspect}' failed to load with error: #{rules.value.respond_to?(:message) ? rules.value.message : rules.value}"
        end
      end

      # This is how we ensure "first-in wins": plugins can override AllCops settings that are
      # set by RuboCop's default configuration, but once a plugin sets an AllCop setting, they
      # have exclusive first-in-wins rights to that setting.
      #
      # The one exception to this are array fields, because we don't want to
      # overwrite the AllCops defaults but rather munge the arrays (`existing |
      # new`) to allow plugins to add to the array, for example Include and
      # Exclude paths and patterns.
      def merge_all_cop_settings(existing_all_cops, new_all_cops, already_configured_keys)
        return [existing_all_cops, already_configured_keys] unless new_all_cops.is_a?(Hash)

        combined_all_cops = existing_all_cops.dup
        combined_configured_keys = already_configured_keys.dup

        new_all_cops.each do |key, value|

View on GitHub (pinned to c93189e2b3)

Solutions

  1. Read the underlying error message appended after 'failed to load with error:' and fix the plugin's rules handling; it usually re-raises the plugin's own exception.
  2. Upgrade or pin the plugin to a version compatible with the installed StandardRB and RuboCop versions.
  3. Run StandardRB with only that one plugin enabled to isolate the failure, then fix or report the error in the plugin's repository.
  4. Ensure the plugin's rules method returns a valid LintRoller::Rules object (path or object type) instead of raising.

When it happens

Trigger: Thrown at lib/standard/plugin/merges_plugins_into_rubocop_config.rb:65 when the library encounters an invalid state.

Common situations: Defense: raised when a lint_roller plugin's `rules` call returns an :error result, meaning the plugin itself failed while producing its rule set. Update the plugin gem to a version compatible with your rubocop and lint_roller versions, then reproduce with `standardrb` outside the editor to see the plugin's underlying error message; if the plugin constructs rules conditionally, check that the files or config it depends on exist in your project.


AI-assisted analysis of standardrb/standard@c93189e2b3 (2026-08-23). Data as JSON: /api/errors/928865ebc62c6adb. Report an issue: GitHub.