standardrb/standard · error

Configuration file "#{resolved_config.expand_path}" not foun

Error message

Configuration file "#{resolved_config.expand_path}" not found.

What it means

Error "Configuration file "#{resolved_config.expand_path}" not found." thrown in standardrb/standard.

Source

Thrown at lib/standard/resolves_yaml_option.rb:18

require "pathname"

module Standard
  class ResolvesYamlOption
    def call(argv, search_path, option_name, default_file)
      search_argv(argv, option_name) || FileFinder.new.call(default_file, search_path)
    end

    private

    def search_argv(argv, option_name)
      return unless (config_file = argv_value_for(argv, option_name))

      resolved_config = Pathname.new(config_file)
      if resolved_config.exist?
        resolved_config.expand_path
      else
        raise "Configuration file \"#{resolved_config.expand_path}\" not found."
      end
    end

    def argv_value_for(argv, option_name)
      return unless (index = argv.index(option_name))

      argv[index + 1]
    end
  end
end

View on GitHub (pinned to c93189e2b3)

Solutions

  1. Check the path passed to --config for typos and confirm the file exists on disk.
  2. Use an absolute path or a path relative to the current working directory where you invoke standardrb.
  3. Omit the --config flag entirely to let StandardRB find the default .standard.yml via its upward file search.

When it happens

Trigger: Thrown at lib/standard/resolves_yaml_option.rb:18 when the library encounters an invalid state.

Common situations: Defense: raised when the value passed to a --config-style CLI option points to a file that does not exist. Check for typos in the path, verify the path is correct relative to the directory where you invoked standardrb (relative paths are resolved against the current working directory, not the project root), and confirm the file was not deleted, renamed, or excluded by a sparse checkout.


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