AllCops: TargetRubyVersion: 2.6.0 Style/Documentation: Enabled: true Exclude: - 'test/**/*.rb' Style/DocumentationMethod: Enabled: true Exclude: - 'test/**/*.rb' # Don't leave calls to pry lying around. Lint/Debugger: Enabled: true Metrics/LineLength: Max: 150 Style/StringLiterals: EnforcedStyle: double_quotes Style/FrozenStringLiteralComment: Enabled: false Naming/HeredocDelimiterNaming: Enabled: false # Only use braces if the function expects a hash argument. [different in Ruby 2.7+](https://blog.saeloun.com/2019/10/07/ruby-2-7-keyword-arguments-redesign.html) Style/BracesAroundHashParameters: Enabled: false Layout/IndentFirstHashElement: EnforcedStyle: consistent Layout/IndentFirstArrayElement: EnforcedStyle: consistent # https://unix.stackexchange.com/a/18789 Layout/TrailingBlankLines: EnforcedStyle: final_newline Style/TrailingCommaInArguments: EnforcedStyleForMultiline: comma Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma Layout/EmptyLineAfterGuardClause: Enabled: false Style/DefWithParentheses: Enabled: false Style/MethodCallWithoutArgsParentheses: Enabled: false # Explicit, not redundant Style/RedundantReturn: Enabled: false # Explicit, not redundant Style/RedundantSelf: Enabled: false # Use of `&` with bracket access isn't what I'd call "readable". Style/SafeNavigation: Enabled: false Style/WordArray: EnforcedStyle: brackets Style/SymbolArray: EnforcedStyle: brackets # TODO: File issue to ignore ternary statements when using `EnforcedStyle: assign_inside_condition`. Style/ConditionalAssignment: # EnforcedStyle: assign_inside_condition # EnforcedStyle: assign_to_condition Enabled: false Lint/HandleExceptions: AllowComments: true Metrics/BlockLength: Enabled: false Metrics/ClassLength: Enabled: false Metrics/ModuleLength: Enabled: false Metrics/MethodLength: Enabled: false Metrics/AbcSize: Enabled: false Metrics/CyclomaticComplexity: Enabled: false Metrics/PerceivedComplexity: Enabled: false Layout/EmptyLinesAroundBlockBody: Enabled: false Style/ZeroLengthPredicate: Enabled: false Style/NumericPredicate: Enabled: false Style/CommentedKeyword: Enabled: False Naming/VariableNumber: EnforcedStyle: snake_case