{"record":{"id":"9fc5a927625d532d","repo":"sds/overcommit","slug":"unexpected-output-no-file-found-in-message","errorCode":null,"errorMessage":"Unexpected output: no file found in '#{message}'","messagePattern":"Unexpected output: no file found in '#(.+?)'","errorType":"exception","errorClass":"Overcommit::Exceptions::MessageProcessingError","httpStatus":null,"severity":"error","filePath":"lib/overcommit/utils/messages_utils.rb","lineNumber":46,"sourceCode":"                  \"of error/warning for output:\\n\" \\\n                  \"#{output_messages[index..].join(\"\\n\")}\"\n          end\n\n          file = extract_file(match, message)\n          line = extract_line(match, message) if match.names.include?('line') && match[:line]\n          type = extract_type(match, message, type_categorizer)\n\n          Overcommit::Hook::Message.new(type, file, line, message)\n        end\n      end\n\n      private\n\n      def extract_file(match, message)\n        return unless match.names.include?('file')\n\n        if match[:file].to_s.empty?\n          raise Overcommit::Exceptions::MessageProcessingError,\n                \"Unexpected output: no file found in '#{message}'\"\n        end\n\n        match[:file]\n      end\n\n      def extract_line(match, message)\n        return unless match.names.include?('line')\n\n        Integer(match[:line])\n      rescue ArgumentError, TypeError\n        raise Overcommit::Exceptions::MessageProcessingError,\n              \"Unexpected output: invalid line number found in '#{message}'\"\n      end\n\n      def extract_type(match, message, type_categorizer)\n        if type_categorizer\n          type_match = match.names.include?('type') ? match[:type] : nil","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/sds/overcommit/blob/fee0cd74b26eb81f64b43b7fab17bbb541575cc4/lib/overcommit/utils/messages_utils.rb#L28-L64","documentation":"Error \"Unexpected output: no file found in '#{message}'\" thrown in sds/overcommit.","triggerScenarios":"Thrown at lib/overcommit/utils/messages_utils.rb:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure each line of the tool's output starts with a file path (e.g. `path/to/file:1: error: msg`).","Update the tool's flags or the hook's parsing so output lines include file names that the extractor can find."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fee0cd74b26eb81f64b43b7fab17bbb541575cc4","analyzedAt":"2026-08-23T04:07:28.153Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}