class Chutney::TooManyDifferentTags

service class to lint for too many different tags

Public Instance Methods

all_tags() click to toggle source
# File lib/chutney/linter/too_many_different_tags.rb, line 20
def all_tags
  return [] unless feature&.scenarios

  tags_for(feature) + feature.scenarios.map { |scenario| tags_for(scenario) }.flatten
end
lint() click to toggle source
# File lib/chutney/linter/too_many_different_tags.rb, line 6
def lint
  tags = all_tags
  return if tags.length <= maxcount

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