{"record":{"id":"a397459be09fba52","repo":"iberianpig/fusuma","slug":"invalid-syntax-path-e-message","errorCode":null,"errorMessage":"Invalid syntax: #{path} #{e.message}","messagePattern":"Invalid syntax: #(.+?) #(.+?)","errorType":"exception","errorClass":"InvalidFileError","httpStatus":null,"severity":"error","filePath":"lib/fusuma/config.rb","lineNumber":117,"sourceCode":"    # @return [Hash] If check passes\n    # @raise [InvalidFileError] If check does not pass\n    #: (String) -> Array[Hash[Symbol, untyped]]\n    def validate(path)\n      duplicates = []\n      YAMLDuplicationChecker.check(File.read(path), path) do |ignored, duplicate| # steep:ignore UnexpectedBlockGiven\n        MultiLogger.error \"#{path}: #{ignored.value} is duplicated\"\n        duplicates << duplicate.value\n      end\n      raise InvalidFileError, \"Detect duplicate keys #{duplicates}\" unless duplicates.empty?\n\n      yamls = YAML.load_stream(File.read(path)).compact # steep:ignore NoMethod\n      yamls.map do |yaml|\n        raise InvalidFileError, \"Invalid config.yml: #{path}\" unless yaml.is_a? Hash\n\n        yaml.deep_symbolize_keys\n      end\n    rescue Psych::SyntaxError => e\n      raise InvalidFileError, \"Invalid syntax: #{path} #{e.message}\"\n    end\n\n    # @param index [Index]\n    #: (Fusuma::Config::Index) -> (String | Hash[untyped, untyped] | Integer | Float)?\n    def search(index)\n      return nil if index.nil? || index.keys.empty?\n      @searcher.search_with_cache(index, location: keymap)\n    end\n\n    # @param index [Config::Index]\n    # @return Symbol\n    def find_execute_key(index)\n      @execute_keys ||= Plugin::Executors::Executor.plugins.map do |executor|\n        executor.new.execute_keys\n      end.flatten\n\n      @cache_execute_keys ||= {} #: Hash[String, untyped]\n","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/iberianpig/fusuma/blob/43a7eb04fe6c0709a646be183a612e56e5f60a2e/lib/fusuma/config.rb#L99-L135","documentation":"Error \"Invalid syntax: #{path} #{e.message}\" thrown in iberianpig/fusuma.","triggerScenarios":"Thrown at lib/fusuma/config.rb:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the YAML syntax error in the file at the reported path; the parser message included in the error shows the line and column.","Check for common mistakes: tabs instead of spaces, unbalanced quotes or brackets, and incorrect indentation.","Validate the file with a YAML parser until it parses without errors."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"43a7eb04fe6c0709a646be183a612e56e5f60a2e","analyzedAt":"2026-08-23T06:17:53.504Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}