Sha256: 39b368a71a362f484da6876510316f8f7a393c7d9e172013ac9f46ebbe25f5dc

Contents?: true

Size: 439 Bytes

Versions: 14

Compression:

Stored size: 439 Bytes

Contents

require 'gherkin_lint/linter'

module GherkinLint
  # service class to lint for avoiding periods
  class AvoidPeriod < Linter
    def lint
      scenarios do |file, feature, scenario|
        next unless scenario.key? :steps

        scenario[:steps].each do |step|
          references = [reference(file, feature, scenario, step)]
          add_error(references) if step[:text].strip.end_with? '.'
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
gherkin_lint-1.2.2 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-1.2.1 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-1.1.0 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-1.0.0 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.6.3 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.6.2 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.6.1 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.6.0 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.5.0 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.4.4 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.4.3 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.4.2 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.4.1 lib/gherkin_lint/linter/avoid_period.rb
gherkin_lint-0.4.0 lib/gherkin_lint/linter/avoid_period.rb