Skip to content

Handle RescuedExceptionsVariableName with rescue_from #49

@anthony-robin

Description

@anthony-robin

Following what have been done in the Naming/RescuedExceptionsVariableName cop in the rubocop repo, we should also handle the Rails version that use rescue_from:

class MyController < ApplicationController
  rescue_from MyException do |exception| # <= should be flagged with an offense
    # do something
  end
end

Should this cop read the configuration of Naming/RescuedExceptionsVariableName or have its own duplicated ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions