mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Merge pull request #183 from glennsarti/add-rubocop
(maint) Add rubocop and allow failures in Travis CI
This commit is contained in:
commit
145ecb443f
5 changed files with 603 additions and 6 deletions
43
.rubocop.yml
Normal file
43
.rubocop.yml
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
inherit_from: .rubocop_todo.yml
|
||||||
|
|
||||||
|
AllCops:
|
||||||
|
Include:
|
||||||
|
- 'lib/**/*.rb'
|
||||||
|
- 'vmpooler'
|
||||||
|
Exclude:
|
||||||
|
- 'lib/public/lib/**/*'
|
||||||
|
- 'scripts/**/*'
|
||||||
|
- 'spec/**/*'
|
||||||
|
- 'vendor/**/*'
|
||||||
|
|
||||||
|
Style/Documentation:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# Line length is not useful
|
||||||
|
Metrics/LineLength:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
|
||||||
|
# Due to legacy codebase
|
||||||
|
# - Globals are used liberally
|
||||||
|
Style/GlobalVars:
|
||||||
|
Enabled: false
|
||||||
|
# - A lot of complexity
|
||||||
|
Metrics/AbcSize:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/PerceivedComplexity:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/CyclomaticComplexity:
|
||||||
|
Enabled: false
|
||||||
|
# - Long Methods, Classes and blocks
|
||||||
|
Metrics/MethodLength:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/ClassLength:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/BlockLength:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
|
||||||
|
# Either sytnax for regex is ok
|
||||||
|
Style/RegexpLiteral:
|
||||||
|
Enabled: false
|
||||||
526
.rubocop_todo.yml
Normal file
526
.rubocop_todo.yml
Normal file
|
|
@ -0,0 +1,526 @@
|
||||||
|
# This configuration was generated by
|
||||||
|
# `rubocop --auto-gen-config`
|
||||||
|
# on 2017-02-10 13:29:15 -0800 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
|
||||||
|
# versions of RuboCop, may require this file to be generated again.
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Configuration parameters: AllowSafeAssignment.
|
||||||
|
Lint/AssignmentInCondition:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
Lint/ConditionPosition:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
Lint/HandleExceptions:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Lint/ShadowingOuterLocalVariable:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
||||||
|
Lint/UnusedMethodArgument:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/dummy_statsd.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
Lint/UselessAssignment:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Configuration parameters: CountBlocks.
|
||||||
|
Metrics/BlockNesting:
|
||||||
|
Max: 5
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: CountComments.
|
||||||
|
Metrics/ModuleLength:
|
||||||
|
Max: 289
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: CountKeywordArgs.
|
||||||
|
Metrics/ParameterLists:
|
||||||
|
Max: 7
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Performance/RedundantMatch:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Security/YAMLLoad:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: with_first_parameter, with_fixed_indentation
|
||||||
|
Style/AlignParameters:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: always, conditionals
|
||||||
|
Style/AndOr:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
||||||
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
||||||
|
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
||||||
|
# FunctionalMethods: let, let!, subject, watch
|
||||||
|
# IgnoredMethods: lambda, proc, it
|
||||||
|
Style/BlockDelimiters:
|
||||||
|
Exclude:
|
||||||
|
- 'vmpooler'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: braces, no_braces, context_dependent
|
||||||
|
Style/BracesAroundHashParameters:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
Style/CaseEquality:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 12
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentOneStep, IndentationWidth.
|
||||||
|
# SupportedStyles: case, end
|
||||||
|
Style/CaseIndentation:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: is_a?, kind_of?
|
||||||
|
Style/ClassCheck:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/ClosingParenthesisIndentation:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
||||||
|
# SupportedStyles: assign_to_condition, assign_inside_condition
|
||||||
|
Style/ConditionalAssignment:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLines:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
||||||
|
Style/EmptyLinesAroundClassBody:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
||||||
|
Style/EmptyLinesAroundModuleBody:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/EmptyLiteral:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: compact, expanded
|
||||||
|
Style/EmptyMethod:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/dummy_statsd.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
||||||
|
Style/ExtraSpacing:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
- 'lib/vmpooler/statsd.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
||||||
|
Style/FirstParameterIndentation:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: for, each
|
||||||
|
Style/For:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: format, sprintf, percent
|
||||||
|
Style/FormatString:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 9
|
||||||
|
# Configuration parameters: MinBodyLength.
|
||||||
|
Style/GuardClause:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 24
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
||||||
|
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
||||||
|
Style/HashSyntax:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
Style/IfInsideElse:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 6
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: MaxLineLength.
|
||||||
|
Style/IfUnlessModifier:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
||||||
|
Style/IndentArray:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 7
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
||||||
|
Style/IndentHash:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: Width.
|
||||||
|
Style/IndentationWidth:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
- 'lib/vmpooler/api/reroute.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/MethodCallWithoutArgsParentheses:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: symmetrical, new_line, same_line
|
||||||
|
Style/MultilineHashBraceLayout:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: symmetrical, new_line, same_line
|
||||||
|
Style/MultilineMethodCallBraceLayout:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
||||||
|
# SupportedStyles: aligned, indented
|
||||||
|
Style/MultilineOperationIndentation:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/MutableConstant:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/NegatedIf:
|
||||||
|
Exclude:
|
||||||
|
- '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:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: predicate, comparison
|
||||||
|
Style/NumericPredicate:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/**/*'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 3
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/ParallelAssignment:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowSafeAssignment.
|
||||||
|
Style/ParenthesesAroundCondition:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/PerlBackrefs:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
||||||
|
# NamePrefix: is_, has_, have_
|
||||||
|
# NamePrefixBlacklist: is_, has_, have_
|
||||||
|
# NameWhitelist: is_a?
|
||||||
|
Style/PredicateName:
|
||||||
|
Exclude:
|
||||||
|
- 'spec/**/*'
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/RedundantBegin:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 26
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/RedundantParentheses:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowMultipleReturnValues.
|
||||||
|
Style/RedundantReturn:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 5
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/RedundantSelf:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api.rb'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: only_raise, only_fail, semantic
|
||||||
|
Style/SignalException:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 22
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceAfterNot:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
|
||||||
|
# Offense count: 9
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: space, no_space
|
||||||
|
Style/SpaceAroundEqualsInParameterDefault:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler.rb'
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceAroundKeyword:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: AllowForAlignment.
|
||||||
|
Style/SpaceAroundOperators:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/statsd.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceInsideBrackets:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
|
||||||
|
# Offense count: 8
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces.
|
||||||
|
# SupportedStyles: space, no_space, compact
|
||||||
|
# SupportedStylesForEmptyBraces: space, no_space
|
||||||
|
Style/SpaceInsideHashLiteralBraces:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceInsideParens:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
|
||||||
|
# Offense count: 4
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
Style/SpaceInsidePercentLiteralDelimiters:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler.rb'
|
||||||
|
- 'lib/vmpooler/api.rb'
|
||||||
|
|
||||||
|
# Offense count: 47
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
||||||
|
# SupportedStyles: single_quotes, double_quotes
|
||||||
|
Style/StringLiterals:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api.rb'
|
||||||
|
- 'lib/vmpooler/api/dashboard.rb'
|
||||||
|
- 'lib/vmpooler/api/reroute.rb'
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- 'lib/vmpooler/graphite.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
|
- 'lib/vmpooler/statsd.rb'
|
||||||
|
- 'lib/vmpooler/vsphere_helper.rb'
|
||||||
|
- 'vmpooler'
|
||||||
|
|
||||||
|
# Offense count: 2
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: IgnoredMethods.
|
||||||
|
# IgnoredMethods: respond_to, define_method
|
||||||
|
Style/SymbolProc:
|
||||||
|
Exclude:
|
||||||
|
- 'vmpooler'
|
||||||
|
|
||||||
|
# Offense count: 1
|
||||||
|
# Cop supports --auto-correct.
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment.
|
||||||
|
# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
|
||||||
|
Style/TernaryParentheses:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
|
||||||
|
# Offense count: 10
|
||||||
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
||||||
|
# SupportedStyles: snake_case, camelCase
|
||||||
|
Style/VariableName:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/v1.rb'
|
||||||
|
- '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:
|
||||||
|
Exclude:
|
||||||
|
- 'lib/vmpooler/api/helpers.rb'
|
||||||
|
- 'lib/vmpooler/pool_manager.rb'
|
||||||
31
.travis.yml
31
.travis.yml
|
|
@ -3,11 +3,30 @@ sudo: false
|
||||||
language: ruby
|
language: ruby
|
||||||
services:
|
services:
|
||||||
- redis-server
|
- redis-server
|
||||||
rvm:
|
|
||||||
- 2.1.1
|
matrix:
|
||||||
- 2.2.1
|
include:
|
||||||
- 2.2.2
|
- rvm: 2.3.3
|
||||||
- jruby-1.7.8
|
env: "CHECK=rubocop"
|
||||||
|
|
||||||
|
- rvm: 2.1.1
|
||||||
|
env: "CHECK=test"
|
||||||
|
|
||||||
|
- rvm: 2.2.1
|
||||||
|
env: "CHECK=test"
|
||||||
|
|
||||||
|
- rvm: 2.3.3
|
||||||
|
env: "CHECK=test"
|
||||||
|
|
||||||
|
- rvm: jruby-1.7.8
|
||||||
|
env: "CHECK=test"
|
||||||
|
|
||||||
|
# Remove the allow_failures section once
|
||||||
|
# Rubocop is required for Travis to pass a build
|
||||||
|
allow_failures:
|
||||||
|
- rvm: 2.3.3
|
||||||
|
env: "CHECK=rubocop"
|
||||||
|
|
||||||
# This below is a temporary shim to bypass these bundler+jruby bugs:
|
# This below is a temporary shim to bypass these bundler+jruby bugs:
|
||||||
#
|
#
|
||||||
# https://github.com/bundler/bundler/issues/4975
|
# https://github.com/bundler/bundler/issues/4975
|
||||||
|
|
@ -16,4 +35,4 @@ install:
|
||||||
- gem install bundler --version 1.12.5
|
- gem install bundler --version 1.12.5
|
||||||
- bundle _1.12.5_ install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
- bundle _1.12.5_ install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
||||||
script:
|
script:
|
||||||
- bundle _1.12.5_ exec rake
|
- "bundle _1.12.5_ exec rake $CHECK"
|
||||||
|
|
|
||||||
3
Gemfile
3
Gemfile
|
|
@ -22,6 +22,9 @@ group :test do
|
||||||
gem 'rspec', '>= 3.2'
|
gem 'rspec', '>= 3.2'
|
||||||
gem 'simplecov', '>= 0.11.2'
|
gem 'simplecov', '>= 0.11.2'
|
||||||
gem 'yarjuf', '>= 2.0'
|
gem 'yarjuf', '>= 2.0'
|
||||||
|
# Rubocop would be ok jruby but for now we only use it on
|
||||||
|
# MRI or Windows platforms
|
||||||
|
gem "rubocop", :platforms => [:ruby, :x64_mingw]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Evaluate Gemfile.local if it exists
|
# Evaluate Gemfile.local if it exists
|
||||||
|
|
|
||||||
6
Rakefile
6
Rakefile
|
|
@ -1,4 +1,5 @@
|
||||||
require 'rspec/core/rake_task'
|
require 'rspec/core/rake_task'
|
||||||
|
require 'rubocop/rake_task'
|
||||||
|
|
||||||
desc 'Run rspec tests with coloring.'
|
desc 'Run rspec tests with coloring.'
|
||||||
RSpec::Core::RakeTask.new(:test) do |t|
|
RSpec::Core::RakeTask.new(:test) do |t|
|
||||||
|
|
@ -12,4 +13,9 @@ RSpec::Core::RakeTask.new(:junit) do |t|
|
||||||
t.pattern = 'spec/'
|
t.pattern = 'spec/'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc 'Run RuboCop'
|
||||||
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
||||||
|
task.options << '--display-cop-names'
|
||||||
|
end
|
||||||
|
|
||||||
task :default => [:test]
|
task :default => [:test]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue