Sha256: 3d45e22eec524a70140b6ddec8983f16307abd630d0426893180accb005065f5

Contents?: true

Size: 389 Bytes

Versions: 2

Compression:

Stored size: 389 Bytes

Contents

require 'gherkin_lint/linter'

module GherkinLint
  # service class to lint for too long steps
  class TooLongStep < Linter
    def lint
      steps do |file, feature, scenario, step|
        next if step['name'].length < 80
        references = [reference(file, feature, scenario, step)]
        add_error(references, "Used #{step['name'].length} characters")
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gherkin_lint-0.3.1 lib/gherkin_lint/linter/too_long_step.rb
gherkin_lint-0.3.0 lib/gherkin_lint/linter/too_long_step.rb