Sha256: 8cb197ba3e07fab00870a91013babe2d6a0ddd8d23b304b2d0cc18c2efc4d647

Contents?: true

Size: 1.04 KB

Versions: 20

Compression:

Stored size: 1.04 KB

Contents

Feature: Exclude directives
  In order to have a more fine-grained control over what Reek reports
  As a user
  I want to be able to exclude specific contexts from reporting

  Scenario: Exclude multiple contexts
    Given a file named "config.reek" with:
      """
      ---
      detectors:
        UncommunicativeMethodName:
          exclude:
            - "Smelly#x"
        UnusedPrivateMethod:
          enabled: true
          exclude:
            - "Smelly#foobar"
      """
    And a file named "smelly.rb" with:
      """
      class Smelly
        # Should report IrresponsibleModule
        def foo(arg); end # Should report UnusedParameter
        def x; end        # Should not report UncommunicativeMethodName
        private
        def foobar; end   # Should not report UnusedPrivateMethod
      end
      """
    When I run reek -c config.reek smelly.rb
    Then it reports:
    """
    smelly.rb -- 2 warnings:
      [1]:IrresponsibleModule: Smelly has no descriptive comment
      [3]:UnusedParameters: Smelly#foo has unused parameter 'arg'
    """

Version data entries

20 entries across 18 versions & 2 rubygems

Version Path
reek-6.0.3 features/configuration_files/exclude_directives.feature
reek-6.0.2 features/configuration_files/exclude_directives.feature
reek-6.0.1 features/configuration_files/exclude_directives.feature
reek-6.0.0 features/configuration_files/exclude_directives.feature
reek-5.6.0 features/configuration_files/exclude_directives.feature
reek-5.5.0 features/configuration_files/exclude_directives.feature
reek-5.4.1 features/configuration_files/exclude_directives.feature
reek-5.4.0 features/configuration_files/exclude_directives.feature
reek-5.3.2 features/configuration_files/exclude_directives.feature
reek-5.3.1 features/configuration_files/exclude_directives.feature
reek-5.3.0 features/configuration_files/exclude_directives.feature
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/configuration_files/exclude_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_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_directives.feature
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/reek-5.2.0/features/configuration_files/exclude_directives.feature
reek-5.2.0 features/configuration_files/exclude_directives.feature
reek-5.1.0 features/configuration_files/exclude_directives.feature
reek-5.0.2 features/configuration_files/exclude_directives.feature
reek-5.0.1 features/configuration_files/exclude_directives.feature
reek-5.0.0 features/configuration_files/exclude_directives.feature