Sha256: 60c48d46cb569db20ead538bbba08305ab7ba634dde3eb2a81aef135c7a6b3b4

Contents?: true

Size: 353 Bytes

Versions: 7

Compression:

Stored size: 353 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

7 entries across 7 versions & 1 rubygems

Version Path
danger-wcc-0.1.4 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.1.3 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.1.2 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.1.1 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.1.0 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.0.6 lib/wcc/commit_lint/subject_period_check.rb
danger-wcc-0.0.5 lib/wcc/commit_lint/subject_period_check.rb