Sha256: be3c023a6494ffc6ee7517df10795ae36114cc2db037ace4e5c9658b011c7fcf

Contents?: true

Size: 1.22 KB

Versions: 9

Compression:

Stored size: 1.22 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 some paths
    Given a file named "bad_files_live_here/smelly.rb" with:
      """
      # A smelly example class
      class Smelly
        def alfa(bravo); end
      end
      """
    When I run `reek .`
    Then the exit status indicates smells
    Given a file named "config.reek" with:
      """
      ---
      exclude_paths:
        - bad_files_live_here
      """
    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

9 entries across 9 versions & 1 rubygems

Version Path
reek-4.8.1 features/configuration_files/exclude_paths_directives.feature
reek-4.8.0 features/configuration_files/exclude_paths_directives.feature
reek-4.7.3 features/configuration_files/exclude_paths_directives.feature
reek-4.7.2 features/configuration_files/exclude_paths_directives.feature
reek-4.7.1 features/configuration_files/exclude_paths_directives.feature
reek-4.7.0 features/configuration_files/exclude_paths_directives.feature
reek-4.6.2 features/configuration_files/exclude_paths_directives.feature
reek-4.6.1 features/configuration_files/exclude_paths_directives.feature
reek-4.6.0 features/configuration_files/exclude_paths_directives.feature