Sha256: 0bdb150bdf4b96a710d63244dc1243c93814ca9bcf54bc3497f3e123485a0a65

Contents?: true

Size: 446 Bytes

Versions: 9

Compression:

Stored size: 446 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
chutney-2.2.1 lib/chutney/linter/too_long_step.rb
chutney-2.1.1 lib/chutney/linter/too_long_step.rb
chutney-2.1.0 lib/chutney/linter/too_long_step.rb
chutney-2.0.3.1 lib/chutney/linter/too_long_step.rb
chutney-2.0.3 lib/chutney/linter/too_long_step.rb
chutney-2.0.2 lib/chutney/linter/too_long_step.rb
chutney-2.0.1 lib/chutney/linter/too_long_step.rb
chutney-2.0.0 lib/chutney/linter/too_long_step.rb
chutney-2.0.0.rc1 lib/chutney/linter/too_long_step.rb