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-8.0.3 lib/danger/request_sources/support/get_ignored_violation.rb
danger-8.0.2 lib/danger/request_sources/support/get_ignored_violation.rb
danger-8.0.1 lib/danger/request_sources/support/get_ignored_violation.rb
danger-8.0.0 lib/danger/request_sources/support/get_ignored_violation.rb
danger-7.0.1 lib/danger/request_sources/support/get_ignored_violation.rb
danger-7.0.0 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.3.2 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.3.1 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.3.0 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.2.2 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.2.1 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.2.0 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.1.0 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.0.9 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.0.8 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.0.7 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.0.6 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.0.5 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.0.4 lib/danger/request_sources/support/get_ignored_violation.rb
danger-6.0.3 lib/danger/request_sources/support/get_ignored_violation.rb