Sha256: 8d1be13a6dc37d03133be88168439bf170dae7b35d8dcf57a706c4e3681b4502

Contents?: true

Size: 744 Bytes

Versions: 251

Compression:

Stored size: 744 Bytes

Contents

require 'precheck/rule'
require 'precheck/rules/abstract_text_match_rule'

module Precheck
  class CopyrightDateRule < AbstractTextMatchRule
    def self.key
      :copyright_date
    end

    def self.env_name
      "RULE_COPYRIGHT_DATE"
    end

    def self.friendly_name
      "Incorrect, or missing copyright date"
    end

    def self.description
      "using a copyright date that is any different from this current year, or missing a date"
    end

    def pass_if_empty?
      return false
    end

    def supported_fields_symbol_set
      [:copyright].to_set
    end

    def word_search_type
      WORD_SEARCH_TYPES[:fail_on_exclusion]
    end

    def lowercased_words_to_look_for
      [DateTime.now.year.to_s]
    end
  end
end

Version data entries

251 entries across 251 versions & 1 rubygems

Version Path
fastlane-2.74.0.beta.20180106010004 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.73.0 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.73.0.beta.20180105010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.73.0.beta.20180104010004 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.73.0.beta.20180103010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.72.0 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.72.0.beta.20180102010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.72.0.beta.20180101010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.72.0.beta.20171231010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.1 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.72.0.beta.20171230010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.72.0.beta.20171229010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.72.0.beta.20171228010004 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.0 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.0.beta.20171227010004 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.0.beta.20171226010004 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.0.beta.20171225010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.0.beta.20171224010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.0.beta.20171223010003 precheck/lib/precheck/rules/copyright_date_rule.rb
fastlane-2.71.0.beta.20171222010003 precheck/lib/precheck/rules/copyright_date_rule.rb