diff --git a/.rubocop.yml b/.rubocop.yml index f0fb43c..c5cf24d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -51,3 +51,10 @@ Style/WordArray: # Either sytnax for regex is ok Style/RegexpLiteral: Enabled: false + +# In some cases readability is better without these cops enabled +Style/ConditionalAssignment: + Enabled: false +Next: + Enabled: false + diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 027cd7f..048645a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2017-03-16 15:37:18 -0700 using RuboCop version 0.47.1. +# on 2017-03-30 17:30:59 -0700 using RuboCop version 0.47.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -56,6 +56,11 @@ Performance/RedundantMatch: - 'lib/vmpooler/api/v1.rb' - 'lib/vmpooler/vsphere_helper.rb' +# Offense count: 1 +Style/AccessorMethodName: + Exclude: + - 'lib/vmpooler/providers/vsphere.rb' + # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. @@ -97,7 +102,7 @@ Style/CaseEquality: Exclude: - 'lib/vmpooler/api/helpers.rb' -# Offense count: 13 +# Offense count: 12 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentOneStep, IndentationWidth. # SupportedStyles: case, end @@ -115,9 +120,7 @@ Style/ClosingParenthesisIndentation: # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions. -# SupportedStyles: assign_to_condition, assign_inside_condition -Style/ConditionalAssignment: +Style/EmptyCaseCondition: Exclude: - 'lib/vmpooler/vsphere_helper.rb' @@ -173,7 +176,7 @@ Style/FormatString: Exclude: - 'lib/vmpooler/pool_manager.rb' -# Offense count: 9 +# Offense count: 10 # Configuration parameters: MinBodyLength. Style/GuardClause: Exclude: @@ -272,18 +275,6 @@ Style/NegatedIf: - 'lib/vmpooler/api/v1.rb' - 'lib/vmpooler/pool_manager.rb' -# Offense count: 12 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. -# SupportedStyles: skip_modifier_ifs, always -Style/Next: - Exclude: - - 'lib/vmpooler/api/dashboard.rb' - - 'lib/vmpooler/api/helpers.rb' - - 'lib/vmpooler/api/v1.rb' - - 'lib/vmpooler/pool_manager.rb' - - 'lib/vmpooler/vsphere_helper.rb' - # Offense count: 3 # Cop supports --auto-correct. Style/Not: @@ -337,6 +328,12 @@ Style/RedundantBegin: Exclude: - 'lib/vmpooler/pool_manager.rb' +# Offense count: 2 +# Cop supports --auto-correct. +Style/RedundantException: + Exclude: + - 'lib/vmpooler/vsphere_helper.rb' + # Offense count: 26 # Cop supports --auto-correct. Style/RedundantParentheses: @@ -452,14 +449,6 @@ Style/VariableName: - 'lib/vmpooler/pool_manager.rb' - 'lib/vmpooler/vsphere_helper.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: SupportedStyles, WordRegex. -# SupportedStyles: percent, brackets -Style/WordArray: - EnforcedStyle: percent - MinSize: -Infinity - # Offense count: 2 # Cop supports --auto-correct. Style/ZeroLengthPredicate: