Sha256: 8194c50b8bdd894e302854fb26d4a18f90d48eab644fdde9aa6e5214de9b7578

Contents?: true

Size: 460 Bytes

Versions: 14

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

module Chutney
  # service class to lint for too long steps
  class TooLongStep < Linter
    def lint
      steps do |feature, scenario, step|
        next if step.text.length <= maxlength

        add_issue(
          I18n.t('linters.too_long_step', length: step.text.length, max: maxlength),
          feature, scenario
        )
      end
    end

    def maxlength
      configuration['MaxLength'] || '120'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
chutney-3.9.0 lib/chutney/linter/too_long_step.rb
chutney-3.8.2 lib/chutney/linter/too_long_step.rb
chutney-3.8.1 lib/chutney/linter/too_long_step.rb
chutney-3.8.0 lib/chutney/linter/too_long_step.rb
chutney-3.7.0 lib/chutney/linter/too_long_step.rb
chutney-3.6.0 lib/chutney/linter/too_long_step.rb
chutney-3.5.0 lib/chutney/linter/too_long_step.rb
chutney-3.3.0 lib/chutney/linter/too_long_step.rb
chutney-3.2.1 lib/chutney/linter/too_long_step.rb
chutney-3.2.0 lib/chutney/linter/too_long_step.rb
chutney-3.1.1 lib/chutney/linter/too_long_step.rb
chutney-3.1.0 lib/chutney/linter/too_long_step.rb
chutney-3.0.1 lib/chutney/linter/too_long_step.rb
chutney-3.0.0 lib/chutney/linter/too_long_step.rb