You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be clear, concise and precise in your description of the problem.
Open an issue with a descriptive title and a summary in grammatically correct,
complete sentences.
Use the template below when reporting bugs. Please, make sure that
you're running the latest stable RuboCop and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Before filing the ticket you should replace all text above the horizontal
rule with your own words.
Expected behavior
The Layout/SpaceAroundKeyword cop should allow code such as super::MyModule and super::MY_CONST.
A common example of this construct could be in Rails to dynamically refer to modules such as SomeActiveRecordClass::GeneratedAssociationMethods
My specific use case is simply a plain-ruby method that returns a module being overridden by subclasses to return a dynamically-generated child module:
def storage_class
secure? ? super::Secure : super
end
Actual behavior
Layout/SpaceAroundKeyword: Space after keyword super is missing.
Steps to reproduce the problem
Run rubocop over a file with the following contents:
# this part is just for fun; option to skip if these are already defined :-)
module RuboCop
module Cop
module Layout
end
end
end
class C
def mod
return RuboCop::Cop
end
end
class D < C
def mod
super::Layout
end
end
RuboCop version
0.76.0 (using Parser 2.6.5.0, running on ruby 2.6.1 x86_64-darwin18)
The text was updated successfully, but these errors were encountered:
Be clear, concise and precise in your description of the problem.
Open an issue with a descriptive title and a summary in grammatically correct,
complete sentences.
Use the template below when reporting bugs. Please, make sure that
you're running the latest stable RuboCop and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Before filing the ticket you should replace all text above the horizontal
rule with your own words.
Expected behavior
The
Layout/SpaceAroundKeyword
cop should allow code such assuper::MyModule
andsuper::MY_CONST
.A common example of this construct could be in Rails to dynamically refer to modules such as
SomeActiveRecordClass::GeneratedAssociationMethods
My specific use case is simply a plain-ruby method that returns a module being overridden by subclasses to return a dynamically-generated child module:
Actual behavior
Steps to reproduce the problem
Run rubocop over a file with the following contents:
RuboCop version
The text was updated successfully, but these errors were encountered: