rubocop-layout.yml in gitlab-styles-3.4.0 vs rubocop-layout.yml in gitlab-styles-4.0.0
- old
+ new
@@ -1,22 +1,18 @@
# Check indentation of private/protected visibility modifiers.
Layout/AccessModifierIndentation:
Enabled: true
# Align the elements of an array literal if they span more than one line.
-Layout/AlignArray:
+Layout/ArrayAlignment:
Enabled: true
-# Align the elements of a hash literal if they span more than one line.
-Layout/AlignHash:
+# Checks the indentation of the first line of the right-hand-side of a
+# multi-line assignment.
+Layout/AssignmentIndentation:
Enabled: true
-# Here we check if the parameters on a multi-line method call or
-# definition are aligned.
-Layout/AlignParameters:
- Enabled: false
-
# Align block ends correctly.
Layout/BlockAlignment:
Enabled: true
# Put end statement of multiline block on its own line.
@@ -100,31 +96,40 @@
# Checks for a line break before the first parameter in a multi-line method
# parameter definition.
Layout/FirstMethodParameterLineBreak:
Enabled: true
+# Align the elements of a hash literal if they span more than one line.
+Layout/HashAlignment:
+ Enabled: true
+
+# This cops checks the indentation of the here document bodies.
+Layout/HeredocIndentation:
+ Enabled: false
+
# Keep indentation straight.
Layout/IndentationConsistency:
Enabled: true
+# No hard tabs.
+Layout/IndentationStyle:
+ Enabled: true
+
# Use 2 spaces for indentation.
Layout/IndentationWidth:
Enabled: true
-# Checks the indentation of the first line of the right-hand-side of a
-# multi-line assignment.
-Layout/IndentAssignment:
- Enabled: true
-
-# This cops checks the indentation of the here document bodies.
-Layout/IndentHeredoc:
- Enabled: false
-
# Comments should start with a space.
Layout/LeadingCommentSpace:
Enabled: true
+# Limit lines to 120 characters.
+Layout/LineLength:
+ Enabled: true
+ Max: 120
+ IgnoredPatterns: ['\s#\srubocop']
+
# Checks that the closing brace in an array literal is either on the same line
# as the last array element, or a new line.
Layout/MultilineArrayBraceLayout:
Enabled: true
EnforcedStyle: symmetrical
@@ -158,10 +163,15 @@
# Checks indentation of binary operations that span more than one line.
Layout/MultilineOperationIndentation:
Enabled: true
EnforcedStyle: indented
+# Here we check if the parameters on a multi-line method call or
+# definition are aligned.
+Layout/ParameterAlignment:
+ Enabled: false
+
# Use spaces after colons.
Layout/SpaceAfterColon:
Enabled: true
# Use spaces after commas.
@@ -187,10 +197,14 @@
# Use a space around keywords if appropriate.
Layout/SpaceAroundKeyword:
Enabled: true
+# Checks method call operators to not have spaces around them.
+Layout/SpaceAroundMethodCallOperator:
+ Enabled: true
+
# Use a single space around operators.
Layout/SpaceAroundOperators:
Enabled: true
# Checks that block braces have or don't have a space before the opening
@@ -233,15 +247,11 @@
# Checks for padding/surrounding spaces inside string interpolation.
Layout/SpaceInsideStringInterpolation:
EnforcedStyle: no_space
Enabled: true
-# No hard tabs.
-Layout/Tab:
- Enabled: true
-
# Checks trailing blank lines and final newline.
-Layout/TrailingBlankLines:
+Layout/TrailingEmptyLines:
Enabled: true
# Avoid trailing whitespace.
Layout/TrailingWhitespace:
Enabled: true