Sha256: 253d8944d159061d2bfc54309d1ad2ad36d63da4337ed14516de6c0b1c8c4270

Contents?: true

Size: 1.31 KB

Versions: 16

Compression:

Stored size: 1.31 KB

Contents

Feature: Exclude paths directives
  In order to avoid Reek wasting time on files that cannot be fixed
  As a user
  I want to be able to exclude specific paths from being checked

  Scenario: Exclude paths
    Given the smelly file "smelly.rb" in the directory "smelly_sources"
    And the smelly file "smelly.rb" in the directory "smelly_as_well"
    And the smelly file "smelly.rb" in the directory "smelly_as_well_2"
    When I run reek .
    Then the exit status indicates smells
    Given a file named "config.reek" with:
      """
      ---
      exclude_paths:
        - smelly_sources/smelly.rb
        - smelly_as_well/
        - smelly_as_well_2
      """
    When I run reek -c config.reek .
    Then it succeeds
    And it reports nothing

  Scenario: Using a file name within an excluded directory
    Given a file named "bad_files_live_here/smelly.rb" with:
      """
      # A smelly example class
      class Smelly
        def alfa(bravo); end
      end
      """
    And a file named "config.reek" with:
      """
      ---
      exclude_paths:
        - bad_files_live_here
      """
    When I run reek -c config.reek bad_files_live_here/smelly.rb
    Then the exit status indicates smells
    When I run reek -c config.reek --force-exclusion bad_files_live_here/smelly.rb
    Then it succeeds
    And it reports nothing

Version data entries

16 entries across 14 versions & 2 rubygems

Version Path
reek-6.0.3 features/configuration_files/exclude_paths_directives.feature
reek-6.0.2 features/configuration_files/exclude_paths_directives.feature
reek-6.0.1 features/configuration_files/exclude_paths_directives.feature
reek-6.0.0 features/configuration_files/exclude_paths_directives.feature
reek-5.6.0 features/configuration_files/exclude_paths_directives.feature
reek-5.5.0 features/configuration_files/exclude_paths_directives.feature
reek-5.4.1 features/configuration_files/exclude_paths_directives.feature
reek-5.4.0 features/configuration_files/exclude_paths_directives.feature
reek-5.3.2 features/configuration_files/exclude_paths_directives.feature
reek-5.3.1 features/configuration_files/exclude_paths_directives.feature
reek-5.3.0 features/configuration_files/exclude_paths_directives.feature
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/configuration_files/exclude_paths_directives.feature
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/configuration_files/exclude_paths_directives.feature
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/configuration_files/exclude_paths_directives.feature
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/configuration_files/exclude_paths_directives.feature
reek-5.2.0 features/configuration_files/exclude_paths_directives.feature