.rubocop.yml in eddy-0.1.0 vs .rubocop.yml in eddy-0.3.0

- old
+ new

@@ -1,25 +1,50 @@ AllCops: - TargetRubyVersion: 2.3.0 + TargetRubyVersion: 2.5.0 +Style/SingleLineMethods: + Exclude: + - 'test/**/*.rb' + +# Don't leave calls to pry lying around. +Lint/Debugger: + Enabled: true + +# ============================================================================== +# Documentation +# ============================================================================== + Style/Documentation: Enabled: true Exclude: - 'test/**/*.rb' Style/DocumentationMethod: Enabled: true Exclude: - 'test/**/*.rb' -Style/SingleLineMethods: +# ============================================================================== +# Naming +# ============================================================================== + +Naming/MethodParameterName: + AllowedNames: + - el + - id + +Naming/MethodName: + Enabled: true Exclude: - - 'test/**/*.rb' + - 'lib/definitions/**/*.rb' + - 'build/**/*.rb' -# Don't leave calls to pry lying around. -Lint/Debugger: +Naming/ClassAndModuleCamelCase: Enabled: true + Exclude: + - 'lib/definitions/**/*.rb' + - 'build/**/*.rb' # ============================================================================== # Layout # ============================================================================== @@ -37,11 +62,11 @@ Layout/EmptyLinesAroundBlockBody: Enabled: false # https://unix.stackexchange.com/a/18789 -Layout/TrailingBlankLines: +Layout/TrailingEmptyLines: EnforcedStyle: final_newline # ============================================================================== # Strings # ============================================================================== @@ -53,25 +78,29 @@ Enabled: false Naming/HeredocDelimiterNaming: Enabled: false +Style/FormatString: + EnforcedStyle: sprintf + # ============================================================================== # Numbers # ============================================================================== Style/ZeroLengthPredicate: Enabled: false Style/NumericPredicate: Enabled: false +# preferably `EnforcedStyle: snake_case`, but it varies. Naming/VariableNumber: - EnforcedStyle: snake_case + Enabled: false # ============================================================================== -# Braces, Brackets, & Parens +# Braces, Brackets, and Parentheses # ============================================================================== Style/DefWithParentheses: Enabled: false @@ -87,67 +116,101 @@ Style/SymbolArray: EnforcedStyle: brackets # ============================================================================== -# Unsorted +# Trailing Commas # ============================================================================== -# Default value (special_inside_parentheses) is ridiculous. -# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstHashElement -Layout/IndentFirstHashElement: - EnforcedStyle: consistent - -# Default value (special_inside_parentheses) is ridiculous. -# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstArrayElement -Layout/IndentFirstArrayElement: - EnforcedStyle: consistent - -Layout/AlignHash: - Enabled: false - Style/TrailingCommaInArguments: EnforcedStyleForMultiline: comma Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma -# Explicit, not redundant -Style/RedundantReturn: +# ============================================================================== +# Fewer lines doesn't mean better code +# ============================================================================== + +Metrics/ModuleLength: Enabled: false -# Explicit, not redundant -Style/RedundantSelf: +Metrics/ClassLength: Enabled: false -# `x&.y&.[](:argument)` isn't what I'd call "readable". -# https://stackoverflow.com/questions/34794697/using-with-the-safe-navigation-operator-in-ruby -Style/SafeNavigation: +Metrics/MethodLength: Enabled: false -# TODO: File issue to ignore enums when using `EnforcedStyle: assign_inside_condition`. -Style/ConditionalAssignment: +Metrics/BlockLength: Enabled: false -Lint/HandleExceptions: - AllowComments: true +# TODO: Look into adding an `EnforcedStyle` to not use guard clauses. +Style/GuardClause: + Enabled: false -Metrics/ModuleLength: +# TODO: Look into adding an `EnforcedStyle` to not use if/unless modifiers. +Style/IfUnlessModifier: Enabled: false -Metrics/ClassLength: +Style/Next: Enabled: false -Metrics/MethodLength: +# ============================================================================== +# Explicit, not redundant +# ============================================================================== + +Style/RedundantReturn: Enabled: false -Metrics/BlockLength: +Style/RedundantSelf: Enabled: false +# ============================================================================== +# Exceptions +# ============================================================================== + +Lint/SuppressedException: + AllowComments: true + +Style/RaiseArgs: + EnforcedStyle: exploded + +# ============================================================================== +# Unsorted +# ============================================================================== + +# Default value (special_inside_parentheses) is ridiculous. +# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstHashElement +Layout/FirstHashElementIndentation: + EnforcedStyle: consistent + +# Default value (special_inside_parentheses) is ridiculous. +# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstArrayElement +Layout/FirstArrayElementIndentation: + EnforcedStyle: consistent + +Layout/HashAlignment: + Enabled: false + +# `x&.y&.[](:argument)` isn't what I'd call "readable". +# https://stackoverflow.com/questions/34794697/using-with-the-safe-navigation-operator-in-ruby +Style/SafeNavigation: + Enabled: false + +Style/NegatedIf: + EnforcedStyle: postfix + +# TODO: File issue to ignore enums when using `EnforcedStyle: assign_inside_condition`. +Style/ConditionalAssignment: + Enabled: false + +Style/TernaryParentheses: + EnforcedStyle: require_parentheses_when_complex + Metrics/AbcSize: Enabled: false Metrics/CyclomaticComplexity: Enabled: false @@ -155,5 +218,8 @@ Metrics/PerceivedComplexity: Enabled: false Style/CommentedKeyword: Enabled: False + +Lint/EmptyWhen: + Enabled: false