Ale: Reek linter does not ignore directories

Created on 9 Mar 2018  路  6Comments  路  Source: dense-analysis/ale

Information

VIM version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 6 2018 10:54:01)
macOS version

Operating System: OSX 10.13.3

:ALEInfo

 Current Filetype: ruby
Available Linters: ['brakeman', 'rails_best_practices', 'reek', 'rubocop', 'ruby']
  Enabled Linters: ['brakeman', 'rails_best_practices', 'reek', 'rubocop', 'ruby']
 Linter Variables:

let g:ale_ruby_brakeman_options = ''
let g:ale_ruby_reek_show_context = 0
let g:ale_ruby_reek_show_wiki_link = 0
let g:ale_ruby_rubocop_executable = 'rubocop'
let g:ale_ruby_rubocop_options = ''
let g:ale_ruby_ruby_executable = 'ruby'
 Global Variables:

let g:ale_cache_executable_check_failures = 0
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = 50
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_list_vertical = 0
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = 0
let g:ale_open_list = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
let g:ale_set_balloons = 1
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_type_map = {}
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(finished - exit code 1) ['/bin/sh', '-c', '''rubocop'' --format json --force-exclusion  --stdin ''/Users/bmulholland/dev/coupa_clm/app/models/abilities/contract/actions.rb'' < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/340/actions.rb''']

<<<OUTPUT STARTS>>>
{"metadata":{"rubocop_version":"0.52.1","ruby_engine":"ruby","ruby_version":"2.4.2","ruby_patchlevel":"198","ruby_platform":"x86_64-darwin17"},"files":[{"path":"app/models/abilities/contract/actions.rb","offenses":[{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_lifecycle_actions is too high. [185.4/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":21,"start_column":3,"last_line":231,"last_column":5,"length":7738,"line":21,"column":3}},{"severity":"convention","message":"Metrics/LineLength: Line is too long. [121/120]","cop_name":"Metrics/LineLength","corrected":false,"location":{"start_line":55,"start_column":121,"last_line":55,"last_column":121,"length":1,"line":55,"column":121}},{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_msword_actions is too high. [39.56/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":252,"start_column":3,"last_line":288,"last_column":5,"length":1519,"line":252,"column":3}}]}],"summary":{"offense_count":3,"target_file_count":1,"inspected_file_count":1}}
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/sh', '-c', '''ruby'' -w -c -T1 ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/341/actions.rb''']

<<<NO OUTPUT RETURNED>>>

(started) ['/bin/sh', '-c', 'reek -f json --no-progress --no-color < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/342/actions.rb''']
(started) ['/bin/sh', '-c', '''rubocop'' --format json --force-exclusion  --stdin ''/Users/bmulholland/dev/coupa_clm/app/models/abilities/contract/actions.rb'' < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/343/actions.rb''']
(finished - exit code 0) ['/bin/sh', '-c', '''ruby'' -w -c -T1 ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/344/actions.rb''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 2) ['/bin/sh', '-c', 'reek -f json --no-progress --no-color < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/345/actions.rb''']

<<<OUTPUT STARTS>>>
[{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[60,117,137],"message":"calls '!organization_contract(contract).owner?' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"!organization_contract(contract).owner?","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[105,198],"message":"calls '!signable_contract?(contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"!signable_contract?(contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[39,113,171],"message":"calls 'Flipper::Rails.flipper' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Flipper::Rails.flipper","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[39,171],"message":"calls 'Flipper::Rails.flipper[:r21_core_approvals]' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Flipper::Rails.flipper[:r21_core_approvals]","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[39,171],"message":"calls 'Flipper::Rails.flipper[:r21_core_approvals].enabled?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Flipper::Rails.flipper[:r21_core_approvals].enabled?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[203,212],"message":"calls 'Proc.new { |contract| why_cant?(:sign, contract) }' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Proc.new { |contract| why_cant?(:sign, contract) }","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[79,229],"message":"calls 'can?(:administrate, organization)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"can?(:administrate, organization)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[205,214],"message":"calls 'can?(:sign, contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"can?(:sign, contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[104,116],"message":"calls 'cannot :complete, ::Contract' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"cannot :complete, ::Contract","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[142,197],"message":"calls 'cannot [:sign, :ask_to_sign], ::Contract' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"cannot [:sign, :ask_to_sign], ::Contract","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads.redlines' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads.redlines","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads.redlines.active' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads.redlines.active","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads.redlines.active.any?' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads.redlines.active.any?","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[227,228],"message":"calls 'contract.lock_user' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.lock_user","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[43,147],"message":"calls 'contract.locked_for_editing?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.locked_for_editing?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[52,110,125,172],"message":"calls 'contract.needs_review?' 4 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.needs_review?","count":4,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[84,176],"message":"calls 'contract.pending_reviewers' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.pending_reviewers","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[84,176],"message":"calls 'contract.pending_reviewers.include?(user)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.pending_reviewers.include?(user)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[101,143],"message":"calls 'contract.using_docusign?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.using_docusign?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[99,189],"message":"calls 'organization_access.can_sign?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_access.can_sign?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[23,60,70,78,100,117,137,194],"message":"calls 'organization_contract(contract)' 8 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract)","count":8,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[60,70,78,100,117,137],"message":"calls 'organization_contract(contract).owner?' 6 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract).owner?","count":6,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[71,131],"message":"calls 'reviewable_contract?(contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"reviewable_contract?(contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[105,198],"message":"calls 'signable_contract?(contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"signable_contract?(contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[203,212],"message":"calls 'why_cant?(:sign, contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"why_cant?(:sign, contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[263,286],"message":"calls 'contract.locked_by?(organization)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.locked_by?(organization)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[257,262],"message":"calls 'contract.locked_by?(user)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.locked_by?(user)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[270,278],"message":"calls 'contract.negotiating_in_word?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.negotiating_in_word?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[269,277,285],"message":"calls 'organization_contract(contract)' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract)","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[269,285],"message":"calls 'organization_contract(contract).owner?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract).owner?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#i18n_sign_data","lines":[295,296,297],"message":"refers to 'contract' more than self (maybe move it to another class?)","smell_type":"FeatureEnvy","source":"STDIN","name":"contract","wiki_link":"https://github.com/troessner/reek/blob/master/docs/Feature-Envy.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[21],"message":"has approx 85 statements","smell_type":"TooManyStatements","source":"STDIN","count":85,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Too-Many-Statements.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[252],"message":"has approx 12 statements","smell_type":"TooManyStatements","source":"STDIN","count":12,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Too-Many-Statements.md"}]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/sh', '-c', '''rubocop'' --format json --force-exclusion  --stdin ''/Users/bmulholland/dev/coupa_clm/app/models/abilities/contract/actions.rb'' < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/346/actions.rb''']

<<<OUTPUT STARTS>>>
{"metadata":{"rubocop_version":"0.52.1","ruby_engine":"ruby","ruby_version":"2.4.2","ruby_patchlevel":"198","ruby_platform":"x86_64-darwin17"},"files":[{"path":"app/models/abilities/contract/actions.rb","offenses":[{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_lifecycle_actions is too high. [185.4/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":21,"start_column":3,"last_line":231,"last_column":5,"length":7738,"line":21,"column":3}},{"severity":"convention","message":"Metrics/LineLength: Line is too long. [121/120]","cop_name":"Metrics/LineLength","corrected":false,"location":{"start_line":55,"start_column":121,"last_line":55,"last_column":121,"length":1,"line":55,"column":121}},{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_msword_actions is too high. [39.56/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":252,"start_column":3,"last_line":288,"last_column":5,"length":1519,"line":252,"column":3}}]}],"summary":{"offense_count":3,"target_file_count":1,"inspected_file_count":1}}
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/sh', '-c', '''ruby'' -w -c -T1 ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/347/actions.rb''']

<<<NO OUTPUT RETURNED>>>

(started) ['/bin/sh', '-c', 'reek -f json --no-progress --no-color < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/348/actions.rb''']
(started) ['/bin/sh', '-c', '''rubocop'' --format json --force-exclusion  --stdin ''/Users/bmulholland/dev/coupa_clm/app/models/abilities/contract/actions.rb'' < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/349/actions.rb''']
(finished - exit code 0) ['/bin/sh', '-c', '''ruby'' -w -c -T1 ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/350/actions.rb''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 2) ['/bin/sh', '-c', 'reek -f json --no-progress --no-color < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/351/actions.rb''']

<<<OUTPUT STARTS>>>
[{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[60,117,137],"message":"calls '!organization_contract(contract).owner?' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"!organization_contract(contract).owner?","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[105,198],"message":"calls '!signable_contract?(contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"!signable_contract?(contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[39,113,171],"message":"calls 'Flipper::Rails.flipper' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Flipper::Rails.flipper","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[39,171],"message":"calls 'Flipper::Rails.flipper[:r21_core_approvals]' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Flipper::Rails.flipper[:r21_core_approvals]","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[39,171],"message":"calls 'Flipper::Rails.flipper[:r21_core_approvals].enabled?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Flipper::Rails.flipper[:r21_core_approvals].enabled?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[203,212],"message":"calls 'Proc.new { |contract| why_cant?(:sign, contract) }' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"Proc.new { |contract| why_cant?(:sign, contract) }","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[79,229],"message":"calls 'can?(:administrate, organization)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"can?(:administrate, organization)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[205,214],"message":"calls 'can?(:sign, contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"can?(:sign, contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[104,116],"message":"calls 'cannot :complete, ::Contract' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"cannot :complete, ::Contract","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[142,197],"message":"calls 'cannot [:sign, :ask_to_sign], ::Contract' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"cannot [:sign, :ask_to_sign], ::Contract","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads.redlines' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads.redlines","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads.redlines.active' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads.redlines.active","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[48,121,162],"message":"calls 'contract.comment_threads.redlines.active.any?' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.comment_threads.redlines.active.any?","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[227,228],"message":"calls 'contract.lock_user' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.lock_user","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[43,147],"message":"calls 'contract.locked_for_editing?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.locked_for_editing?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[52,110,125,172],"message":"calls 'contract.needs_review?' 4 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.needs_review?","count":4,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[84,176],"message":"calls 'contract.pending_reviewers' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.pending_reviewers","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[84,176],"message":"calls 'contract.pending_reviewers.include?(user)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.pending_reviewers.include?(user)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[101,143],"message":"calls 'contract.using_docusign?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.using_docusign?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[99,189],"message":"calls 'organization_access.can_sign?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_access.can_sign?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[23,60,70,78,100,117,137,194],"message":"calls 'organization_contract(contract)' 8 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract)","count":8,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[60,70,78,100,117,137],"message":"calls 'organization_contract(contract).owner?' 6 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract).owner?","count":6,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[71,131],"message":"calls 'reviewable_contract?(contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"reviewable_contract?(contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[105,198],"message":"calls 'signable_contract?(contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"signable_contract?(contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[203,212],"message":"calls 'why_cant?(:sign, contract)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"why_cant?(:sign, contract)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[263,286],"message":"calls 'contract.locked_by?(organization)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.locked_by?(organization)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[257,262],"message":"calls 'contract.locked_by?(user)' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.locked_by?(user)","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[270,278],"message":"calls 'contract.negotiating_in_word?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"contract.negotiating_in_word?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[269,277,285],"message":"calls 'organization_contract(contract)' 3 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract)","count":3,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[269,285],"message":"calls 'organization_contract(contract).owner?' 2 times","smell_type":"DuplicateMethodCall","source":"STDIN","name":"organization_contract(contract).owner?","count":2,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md"},{"context":"Abilities::Contract::Actions#i18n_sign_data","lines":[295,296,297],"message":"refers to 'contract' more than self (maybe move it to another class?)","smell_type":"FeatureEnvy","source":"STDIN","name":"contract","wiki_link":"https://github.com/troessner/reek/blob/master/docs/Feature-Envy.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[21],"message":"has approx 85 statements","smell_type":"TooManyStatements","source":"STDIN","count":85,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Too-Many-Statements.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[252],"message":"has approx 12 statements","smell_type":"TooManyStatements","source":"STDIN","count":12,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Too-Many-Statements.md"}]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/sh', '-c', '''rubocop'' --format json --force-exclusion  --stdin ''/Users/bmulholland/dev/coupa_clm/app/models/abilities/contract/actions.rb'' < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/352/actions.rb''']

<<<OUTPUT STARTS>>>
{"metadata":{"rubocop_version":"0.52.1","ruby_engine":"ruby","ruby_version":"2.4.2","ruby_patchlevel":"198","ruby_platform":"x86_64-darwin17"},"files":[{"path":"app/models/abilities/contract/actions.rb","offenses":[{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_lifecycle_actions is too high. [185.4/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":21,"start_column":3,"last_line":231,"last_column":5,"length":7738,"line":21,"column":3}},{"severity":"convention","message":"Metrics/LineLength: Line is too long. [121/120]","cop_name":"Metrics/LineLength","corrected":false,"location":{"start_line":55,"start_column":121,"last_line":55,"last_column":121,"length":1,"line":55,"column":121}},{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_msword_actions is too high. [39.56/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":252,"start_column":3,"last_line":288,"last_column":5,"length":1519,"line":252,"column":3}}]}],"summary":{"offense_count":3,"target_file_count":1,"inspected_file_count":1}}
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/sh', '-c', '''ruby'' -w -c -T1 ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/353/actions.rb''']

<<<NO OUTPUT RETURNED>>>

(started) ['/bin/sh', '-c', 'reek -f json --no-progress --no-color < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/354/actions.rb''']
(started) ['/bin/sh', '-c', '''rubocop'' --format json --force-exclusion  --stdin ''/Users/bmulholland/dev/coupa_clm/app/models/abilities/contract/actions.rb'' < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/355/actions.rb''']
(started) ['/bin/sh', '-c', '''ruby'' -w -c -T1 ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/356/actions.rb''']
(finished - exit code 2) ['/bin/sh', '-c', 'reek -f json --no-progress --no-color < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/357/actions.rb''']

<<<OUTPUT STARTS>>>
[{"context":"Abilities::Contract::Actions#i18n_sign_data","lines":[295,296,297],"message":"refers to 'contract' more than self (maybe move it to another class?)","smell_type":"FeatureEnvy","source":"STDIN","name":"contract","wiki_link":"https://github.com/troessner/reek/blob/master/docs/Feature-Envy.md"},{"context":"Abilities::Contract::Actions#contract_lifecycle_actions","lines":[21],"message":"has approx 85 statements","smell_type":"TooManyStatements","source":"STDIN","count":85,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Too-Many-Statements.md"},{"context":"Abilities::Contract::Actions#contract_msword_actions","lines":[252],"message":"has approx 12 statements","smell_type":"TooManyStatements","source":"STDIN","count":12,"wiki_link":"https://github.com/troessner/reek/blob/master/docs/Too-Many-Statements.md"}]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/sh', '-c', '''rubocop'' --format json --force-exclusion  --stdin ''/Users/bmulholland/dev/coupa_clm/app/models/abilities/contract/actions.rb'' < ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/358/actions.rb''']

<<<OUTPUT STARTS>>>
{"metadata":{"rubocop_version":"0.52.1","ruby_engine":"ruby","ruby_version":"2.4.2","ruby_patchlevel":"198","ruby_platform":"x86_64-darwin17"},"files":[{"path":"app/models/abilities/contract/actions.rb","offenses":[{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_lifecycle_actions is too high. [185.4/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":21,"start_column":3,"last_line":231,"last_column":5,"length":7738,"line":21,"column":3}},{"severity":"convention","message":"Metrics/LineLength: Line is too long. [121/120]","cop_name":"Metrics/LineLength","corrected":false,"location":{"start_line":55,"start_column":121,"last_line":55,"last_column":121,"length":1,"line":55,"column":121}},{"severity":"convention","message":"Metrics/AbcSize: Assignment Branch Condition size for contract_msword_actions is too high. [39.56/20]","cop_name":"Metrics/AbcSize","corrected":false,"location":{"start_line":252,"start_column":3,"last_line":288,"last_column":5,"length":1519,"line":252,"column":3}}]}],"summary":{"offense_count":3,"target_file_count":1,"inspected_file_count":1}}
<<<OUTPUT ENDS>>>

(finished - exit code 0) ['/bin/sh', '-c', '''ruby'' -w -c -T1 ''/var/folders/05/xd6f1dfx29l6k4jw83vw187r0000gn/T/v3lVdjS/359/actions.rb''']

<<<NO OUTPUT RETURNED>>>

What went wrong

ALE does not respect the ignore directories set in a reek configuration.

Reproducing the bug

  1. Use the reek linter.
  2. Add a config.reek file that ignores a directory, like:
"test_dir":
  DuplicateMethodCall:
    enabled: false
  1. Create a file in test_dir that triggers the warning, something like:
def double_thing
  @other.thing + @other.thing
end
  1. Run reek test_dir/file.rb. Note that no DuplicateMethodCall warning is raised.
  2. Open the file in vim with ale: vim test_dir/file.rb

Expected:
No DuplicateMethodError is flagged on line 2

Actual:
DuplicateMethodError is displayed

enhancement

Most helpful comment

Reek 5.0 now supports the --stdin-filename option troessner/reek#1296

All 6 comments

This doesn't work because you can't tell reek what the filename for stdin input is, like ESLint. I'll create an issue for it in reek.

@w0rp I read the linked issue and am saddened by the response you received. I can see how your comment may have come across as a little insulting, but it certainly did not warrant that unprofessional response.

I know that working with the open source community can sometimes be... like this.. so I wanted to counterbalance a bit and share my appreciation for this project. It does everything I wanted from a style checker and it Just Works. The quality and depth of ale has saved me time, increased my flow during development, and helped me write better code. It is one of my favourite Vim plugins and a pleasure to use. Thank you!!

Cheers, I appreciate the sentiment. I'm not that bothered by that kind of stuff.

Reek 5.0 now supports the --stdin-filename option troessner/reek#1296

Now ALE will use --stdin-filename for reek after checking --version, if the version is 5.0.0 or newer.

Was this page helpful?
0 / 5 - 0 ratings