0

Hi i am working on a RoR project with cane gem. I have a method inside an interactor. I am getting Methods exceeded maximum allowed ABC complexity (1): For this method. I want to exclude this method to check complexity. So I tried:

Cane::RakeTask.new(:code_quality) do |cane|
  cane.abc_max = 15
  cane.no_style = true
  cane.no_doc = true
  cane.abc_exclude = %w(App::Interactors::StoreParserInteractor.find_date_time)
end

But still it throws the same error. Please help me how can I ignore ABC complexity only for this method. Thanks in advance.

Jan Klimo
  • 4,643
  • 2
  • 36
  • 42
awsm sid
  • 595
  • 11
  • 28

1 Answers1

1

Looking at the docs, I believe you'll need to go with:

cane.abc_exclude = %w(App::Interactors::StoreParserInteractor#find_date_time)

(notice the # sign where you had a .)

Jan Klimo
  • 4,643
  • 2
  • 36
  • 42