class Renegade::ConflictMarkers

Prevent merge artifacts from getting committed

Attributes

errors[R]

Public Class Methods

new() click to toggle source
# File lib/renegade/conflict_markers.rb, line 9
def initialize
  @label = 'No merge artifacts'
  @errors = []
end

Public Instance Methods

run(markers) click to toggle source
# File lib/renegade/conflict_markers.rb, line 14
def run(markers)
  # markers = `git diff-index --check --cached HEAD --`
  if markers == ''
    Status.report(@label, true)
  else
    Status.report(@label, false)
    @errors.push('Merge artifacts were found!' + "\n" + markers)
  end
end