Sha256: c73dd01019c97f384dcf0b4e6d355c2e428690302662c2992a4b954cb6f84940

Contents?: true

Size: 263 Bytes

Versions: 121

Compression:

Stored size: 263 Bytes

Contents

class GetIgnoredViolation
  IGNORE_REGEXP = />*\s*danger\s*:\s*ignore\s*"(?<error>[^"]*)"/i

  def initialize(body)
    @body = body
  end

  def call
    return [] unless body

    body.chomp.scan(IGNORE_REGEXP).flatten
  end

  private

  attr_reader :body
end

Version data entries

121 entries across 121 versions & 1 rubygems

Version Path
danger-5.7.1 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.7.0 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.7 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.6 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.5 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.4 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.3 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.2 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.1 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.6.0 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.13 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.12 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.11 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.10 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.9 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.8 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.7 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.6 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.5 lib/danger/request_sources/support/get_ignored_violation.rb
danger-5.5.4 lib/danger/request_sources/support/get_ignored_violation.rb