# 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/ArrayAlignment: Enabled: true # Checks the indentation of the first line of the right-hand-side of a # multi-line assignment. Layout/AssignmentIndentation: Enabled: true # Align block ends correctly. Layout/BlockAlignment: Enabled: true # Put end statement of multiline block on its own line. Layout/BlockEndNewline: Enabled: true # Indentation of when in a case/when/[else/]end. Layout/CaseIndentation: Enabled: true # Indentation of comments. Layout/CommentIndentation: Enabled: true # Checks for condition placed in a confusing position relative to the keyword. Layout/ConditionPosition: Enabled: true # Align ends corresponding to defs correctly. Layout/DefEndAlignment: Enabled: true # Multi-line method chaining should be done with leading dots. Layout/DotPosition: Enabled: true EnforcedStyle: leading # Align elses and elsifs correctly. Layout/ElseAlignment: Enabled: true # Add an empty line after magic comments to separate them from code. Layout/EmptyLineAfterMagicComment: Enabled: false # Use empty lines between defs. Layout/EmptyLineBetweenDefs: Enabled: true # Don't use several empty lines in a row. Layout/EmptyLines: Enabled: true # Keep blank lines around access modifiers. Layout/EmptyLinesAroundAccessModifier: Enabled: true # Keeps track of empty lines around block bodies. Layout/EmptyLinesAroundBlockBody: Enabled: true # Keeps track of empty lines around class bodies. Layout/EmptyLinesAroundClassBody: Enabled: true # Keeps track of empty lines around exception handling keywords. Layout/EmptyLinesAroundExceptionHandlingKeywords: Enabled: false # Keeps track of empty lines around method bodies. Layout/EmptyLinesAroundMethodBody: Enabled: true # Keeps track of empty lines around module bodies. Layout/EmptyLinesAroundModuleBody: Enabled: true # Align ends correctly. Layout/EndAlignment: Enabled: true # Use Unix-style line endings. Layout/EndOfLine: Enabled: true # Checks for extra/unnecessary whitespace. # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment. Layout/ExtraSpacing: Enabled: true # 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 # 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 # Ensures newlines after multiline block do statements. Layout/MultilineBlockLayout: Enabled: true # Checks that the closing brace in a hash literal is either on the same line as # the last hash element, or a new line. Layout/MultilineHashBraceLayout: Enabled: true EnforcedStyle: symmetrical # Checks that the closing brace in a method call is either on the same line as # the last method argument, or a new line. Layout/MultilineMethodCallBraceLayout: Enabled: false EnforcedStyle: symmetrical # Checks indentation of method calls with the dot operator that span more than # one line. Layout/MultilineMethodCallIndentation: Enabled: false # Checks that the closing brace in a method definition is symmetrical with # respect to the opening brace and the method parameters. Layout/MultilineMethodDefinitionBraceLayout: Enabled: false # 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. Layout/SpaceAfterComma: Enabled: true # Do not put a space between a method name and the opening parenthesis in a # method definition. Layout/SpaceAfterMethodName: Enabled: true # Tracks redundant space after the ! operator. Layout/SpaceAfterNot: Enabled: true # Use spaces after semicolons. Layout/SpaceAfterSemicolon: Enabled: true # Use space around equals in parameter default Layout/SpaceAroundEqualsInParameterDefault: Enabled: true # 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 # brace depending on configuration. # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: space, no_space Layout/SpaceBeforeBlockBraces: Enabled: true # No spaces before commas. Layout/SpaceBeforeComma: Enabled: true # Checks for missing space between code and a comment on the same line. Layout/SpaceBeforeComment: Enabled: true # No spaces before semicolons. Layout/SpaceBeforeSemicolon: Enabled: true # Checks that brackets used for array literals have or don't have # surrounding space depending on configuration.. Layout/SpaceInsideArrayLiteralBrackets: Enabled: true # Use spaces inside hash literal braces - or don't. Layout/SpaceInsideHashLiteralBraces: Enabled: true # Checks that reference brackets have or don't have # surrounding space depending on configuration. Layout/SpaceInsideReferenceBrackets: Enabled: true # No spaces inside range literals. Layout/SpaceInsideRangeLiteral: Enabled: true # Checks for padding/surrounding spaces inside string interpolation. Layout/SpaceInsideStringInterpolation: EnforcedStyle: no_space Enabled: true # Checks trailing blank lines and final newline. Layout/TrailingEmptyLines: Enabled: true # Avoid trailing whitespace. Layout/TrailingWhitespace: Enabled: true