Sha256: ed6eb67d2bd2aa12fbb8f24ad50e18b38b019fcfe384bee7a59904a7c68e9b44

Contents?: true

Size: 354 Bytes

Versions: 3

Compression:

Stored size: 354 Bytes

Contents

# frozen_string_literal: true

class SubjectPeriodCheck < CommitCheck
  MESSAGE = 'Please remove period from end of commit subject line.'

  def self.type
    :subject_period
  end

  def initialize(message, _options = {})
    @subject = message[:subject]
  end

  def message
    MESSAGE
  end

  def fail?
    @subject.split('').last == '.'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danger-wcc-0.0.4 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.0.3 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.0.2 lib/wcc/commit_lint/subject_period_check.rb