Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable UnusedPrivateMethod detector by default. #847

Merged
merged 1 commit into from
Feb 6, 2016

Conversation

troessner
Copy link
Owner

Fixes #844

Regarding the "re-enable a by default deactivated smell detector for tests" I took some inspiration from the corresponding Attribute smell detector PR here

@troessner troessner force-pushed the disable-UnusedPrivateMethod-detector-by-default branch from e86c083 to b1fc283 Compare February 5, 2016 22:35
@@ -4,6 +4,12 @@
require_relative 'smell_detector_shared'

RSpec.describe Reek::Smells::UnusedPrivateMethod do
let(:configuration) do
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the way we load SmellDetectors and Examiners something like:

  before do
    allow(described_class).
      to receive(:default_config).
      and_return(described_class.superclass.default_config)
  end

or

  before do
    described_class.instance_eval { def default_config; super; end }
  end

doesn't work. But given that we don't do this every other week I'd consider this good enough given the task at hand.

mvz added a commit that referenced this pull request Feb 6, 2016
…tector-by-default

Disable UnusedPrivateMethod detector by default.
@mvz mvz merged commit 0937833 into master Feb 6, 2016
@mvz mvz deleted the disable-UnusedPrivateMethod-detector-by-default branch February 14, 2016 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants