{"record":{"id":"ef2ad178e8414c6a","repo":"ruby/rubygems","slug":"20","errorCode":"20","errorMessage":"Your #{@lockfile_path} contains merge conflicts.\nRun `git checkout HEAD -- #{@lockfile_path}` first to get a clean lock.","messagePattern":"Your #(.+?) contains merge conflicts\\.\nRun `git checkout HEAD -- #(.+?)` first to get a clean lock\\.","errorType":"exception","errorClass":"Bundler::LockfileError","httpStatus":null,"severity":"error","filePath":"lib/bundler/lockfile_parser.rb","lineNumber":114,"sourceCode":"    end\n\n    def initialize(lockfile, strict: false, lockfile_path: nil)\n      @platforms    = []\n      @sources      = []\n      @metadata_source = Source::Metadata.new\n      @dependencies = {}\n      @parse_method = nil\n      @specs        = {}\n      @lockfile_path = lockfile_path || begin\n        SharedHelpers.relative_lockfile_path\n      rescue GemfileNotFound\n        \"Gemfile.lock\"\n      end\n      @pos = Position.new(1, 1)\n      @strict = strict\n\n      if lockfile.match?(/<<<<<<<|=======|>>>>>>>|\\|\\|\\|\\|\\|\\|\\|/)\n        raise LockfileError, \"Your #{@lockfile_path} contains merge conflicts.\\n\" \\\n          \"Run `git checkout HEAD -- #{@lockfile_path}` first to get a clean lock.\"\n      end\n\n      @valid = lockfile.strip.empty? ||\n               lockfile.split(/(?:\\r?\\n)+/).any? {|l| KNOWN_SECTIONS.include?(l) }\n\n      unless @valid\n        SharedHelpers.feature_deprecated!(\n          \"Your #{@lockfile_path} does not appear to be a valid lockfile. \" \\\n          \"Run `rm #{@lockfile_path}` and then `bundle install` to generate a new lockfile. \" \\\n          \"This will raise a LockfileError in a future version of Bundler.\"\n        )\n      end\n\n      lockfile.split(/((?:\\r?\\n)+)/) do |line|\n        # split alternates between the line and the following whitespace\n        next @pos.advance!(line) if line.match?(/^\\s*$/)\n","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/lockfile_parser.rb#L96-L132","documentation":"Error \"Your #{@lockfile_path} contains merge conflicts.\nRun `git checkout HEAD -- #{@lockfile_path}` first to get a clean lock.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/lockfile_parser.rb:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}