Skip to content

Add --exclude-smell CLI option - #1751

Open
willianveiga wants to merge 1 commit into
troessner:masterfrom
willianveiga:features/add-exclude-smell-cli-option
Open

Add --exclude-smell CLI option#1751
willianveiga wants to merge 1 commit into
troessner:masterfrom
willianveiga:features/add-exclude-smell-cli-option

Conversation

@willianveiga

Copy link
Copy Markdown

Add exclude-smell CLI option:

Example without the new option:

$ reek app/controllers/users_controller.rb 
Inspecting 1 file(s):
S

app/controllers/users_controller.rb -- 6 warnings:
  [82, 82]:DuplicateMethodCall: UsersController#session_id calls 'params[:user_id]' 2 times [https://github.com/troessner/reek/blob/v6.1.4/docs/Duplicate-Method-Call.md]
  [72, 72]:DuplicateMethodCall: UsersController#email calls 'email_params[:p]' 2 times [https://github.com/troessner/reek/blob/v6.1.4/docs/Duplicate-Method-Call.md]
  [1]:IrresponsibleModule: UsersController has no descriptive comment [https://github.com/troessner/reek/blob/v6.1.4/docs/Irresponsible-Module.md]
  [82]:NilCheck: UsersController#session_id performs a nil-check [https://github.com/troessner/reek/blob/v6.1.4/docs/Nil-Check.md]
  [99]:NilCheck: UsersController#email_params performs a nil-check [https://github.com/troessner/reek/blob/v6.1.4/docs/Nil-Check.md]
  [1]:TooManyMethods: UsersController has at least 18 methods [https://github.com/troessner/reek/blob/v6.1.4/docs/Too-Many-Methods.md]

Example with the new option:

$ reek --exclude-smell IrresponsibleModule --exclude-smell DuplicateMethodCall app/controllers/users_controller.rb 
Inspecting 1 file(s):
S

app/controllers/users_controller.rb -- 3 warnings:
  [82]:NilCheck: UsersController#session_id performs a nil-check [https://github.com/troessner/reek/blob/v6.1.4/docs/Nil-Check.md]
  [99]:NilCheck: UsersController#email_params performs a nil-check [https://github.com/troessner/reek/blob/v6.1.4/docs/Nil-Check.md]
  [1]:TooManyMethods: UsersController has at least 18 methods [https://github.com/troessner/reek/blob/v6.1.4/docs/Too-Many-Methods.md]

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.

1 participant