class Chutney::TooManyTags

service class to lint for too many tags

Public Instance Methods

lint() click to toggle source
# File lib/chutney/linter/too_many_tags.rb, line 6
def lint
  scenarios do |feature, scenario|
    tags = tags_for(feature) + tags_for(scenario)
    next unless tags.length > maxcount

    add_issue(
      I18n.t('linters.too_many_tags', count: tags.length, max: maxcount),
      feature
    )
  end
end
maxcount() click to toggle source
# File lib/chutney/linter/too_many_tags.rb, line 18
def maxcount
  configuration['MaxCount']&.to_i || 3
end