-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
feature requestgood first issueEasy task, suitable for newcomers to the projectEasy task, suitable for newcomers to the projectstaleIssues that haven't been active in a whileIssues that haven't been active in a while
Description
Is your feature request related to a problem? Please describe.
There's no clear way to divide a long namespace in the middle, if it exceeds max line length:
def foo
# invoke the normal migration method
# in oracle envs this should end up calling ActiveRecord::ConnectionAdapters::OracleEnhanced::SchemaStatements::create_table
yada_yada
end
my_file.rb:3:121: C: Layout/LineLength: Line is too long. [126/120] (https://rubystyle.guide#max-line-length)
Describe the solution you'd like
I propose a new configurable attribute for Layout/LineLength
, for example AllowNamespace
, to allow a fully-qualified method/module/class namespace to extend past the max line length without triggering an offense. It would work exactly like AllowURI
.
Describe alternatives you've considered
The best alternative would probably be to live with it. Long namespaces are not common, and you could split it at a ::
without much grief.
Additional context
None.
kaylareopelle
Metadata
Metadata
Assignees
Labels
feature requestgood first issueEasy task, suitable for newcomers to the projectEasy task, suitable for newcomers to the projectstaleIssues that haven't been active in a whileIssues that haven't been active in a while