Sha256: 509f12d70a361e5fb6b3fbdf09ef7d588fa4d981091255aef9eecce1191f8e69

Contents?: true

Size: 428 Bytes

Versions: 6

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

# Implements a helper that logs a warning if a summary tag has more than 140 characters
module PuppetStrings::Yard::Handlers::Helpers
  def self.validate_summary_tag(object)
    return unless object.has_tag?(:summary) && object.tag(:summary).text.length > 140

    log.warn "The length of the summary for #{object.type} '#{object.name}' exceeds the recommended limit of 140 characters."
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puppet-strings-4.1.3 lib/puppet-strings/yard/handlers/helpers.rb
puppet-strings-4.1.2 lib/puppet-strings/yard/handlers/helpers.rb
puppet-strings-4.1.1 lib/puppet-strings/yard/handlers/helpers.rb
puppet-strings-4.1.0 lib/puppet-strings/yard/handlers/helpers.rb
puppet-strings-4.0.0 lib/puppet-strings/yard/handlers/helpers.rb
puppet-strings-4.0.0.rc.1 lib/puppet-strings/yard/handlers/helpers.rb