Sha256: f546e38e428a652e136a2229d31d619d0ff7d0e59973b7d6174eb576c9a9c2c5

Contents?: true

Size: 1.16 KB

Versions: 34

Compression:

Stored size: 1.16 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:
      """
      ---
      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 [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
      [3]:UnusedParameters: Smelly#foo has unused parameter 'arg' [https://github.com/troessner/reek/blob/master/docs/Unused-Parameters.md]
    """

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
reek-4.8.1 features/configuration_files/exclude_directives.feature
reek-4.8.0 features/configuration_files/exclude_directives.feature
reek-4.7.3 features/configuration_files/exclude_directives.feature
reek-4.7.2 features/configuration_files/exclude_directives.feature
reek-4.7.1 features/configuration_files/exclude_directives.feature
reek-4.7.0 features/configuration_files/exclude_directives.feature
reek-4.6.2 features/configuration_files/exclude_directives.feature
reek-4.6.1 features/configuration_files/exclude_directives.feature
reek-4.6.0 features/configuration_files/exclude_directives.feature
reek-4.5.6 features/configuration_files/exclude_directives.feature
reek-4.5.5 features/configuration_files/exclude_directives.feature
reek-4.5.4 features/configuration_files/exclude_directives.feature
reek-4.5.3 features/configuration_files/exclude_directives.feature
reek-4.5.2 features/configuration_files/exclude_directives.feature
reek-4.5.1 features/configuration_files/exclude_directives.feature
reek-4.5.0 features/configuration_files/exclude_directives.feature
reek-4.4.2 features/configuration_files/exclude_directives.feature
reek-4.4.1 features/configuration_files/exclude_directives.feature
reek-4.4.0 features/configuration_files/exclude_directives.feature
reek-4.3.0 features/configuration_files/exclude_directives.feature