Sha256: ee42b4aecf226213cbef7c74f3cc07cc345fc68fec5cd18e3a186c4a53fdbbfc

Contents?: true

Size: 463 Bytes

Versions: 6

Compression:

Stored size: 463 Bytes

Contents

require 'gherkin_lint/linter'

module GherkinLint
  # service class to lint for too clumsy scenarios
  class TooClumsy < Linter
    def lint
      filled_scenarios do |file, feature, scenario|
        characters = scenario['steps'].map { |step| step['name'].length }.inject(0, :+)
        next if characters < 400
        references = [reference(file, feature, scenario)]
        add_issue(references, "Used #{characters} Characters")
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gherkin_lint-0.1.2 lib/gherkin_lint/linter/too_clumsy.rb
gherkin_lint-0.1.1 lib/gherkin_lint/linter/too_clumsy.rb
gherkin_lint-0.1.0 lib/gherkin_lint/linter/too_clumsy.rb
gherkin_lint-0.0.14 lib/gherkin_lint/linter/too_clumsy.rb
gherkin_lint-0.0.13 lib/gherkin_lint/linter/too_clumsy.rb
gherkin_lint-0.0.12 lib/gherkin_lint/linter/too_clumsy.rb