Sha256: 7cfedeae8faf8a5b23fb7721fce374961a13907b1f33ef5e2c695e5dc038fa4e

Contents?: true

Size: 572 Bytes

Versions: 9

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

module Chutney
  # service class to lint for avoiding splats
  class AvoidSplatStepsInBackground < Linter
    def lint
      background do |feature, background|
        splat_steps = background&.steps&.select { |s| s.keyword == '*' }
        # add_issue(I18n.t('linters.avoid_full_stop'), feature, child, step) if step.text.strip.end_with? '.'
        if splat_steps && !splat_steps.empty?
          add_issue(I18n.t('linters.avoid_splat_steps_in_background'), feature, background, splat_steps.first)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
chutney-3.10.0 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.9.0 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.8.2 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.8.1 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.8.0 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.7.0 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.6.0 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.5.0 lib/chutney/linter/avoid_splat_steps_in_background.rb
chutney-3.3.0 lib/chutney/linter/avoid_splat_steps_in_background.rb