Skip to content

Commit

Permalink
Merge pull request #658 from Justin-W/rubocop-fixes-b
Browse files Browse the repository at this point in the history
Rubocop fixes for #653
  • Loading branch information
rkoster authored Feb 4, 2022
2 parents 43a3579 + 2a89a2e commit 4a066fa
Show file tree
Hide file tree
Showing 122 changed files with 918 additions and 1,291 deletions.
32 changes: 31 additions & 1 deletion src/bosh_azure_cpi/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ Lint/UnmodifiedReduceAccumulator: # new in 1.1
Lint/UselessRuby2Keywords: # new in 1.23
Enabled: true

Metrics/BlockLength:
Exclude:
- 'spec/unit/vm_manager/create/shared_stuff.rb'
- '**/*_spec.rb'

RSpec/ExcessiveDocstringSpacing: # new in 2.5
Enabled: true

Expand All @@ -100,8 +105,21 @@ RSpec/Rails/AvoidSetupHook: # new in 2.4
Security/IoMethods: # new in 1.22
Enabled: true

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowOnlyRestArgument.
Style/ArgumentsForwarding: # new in 1.1
Enabled: true
Exclude:
# Note: Excluding the following file since it seems like that file might need backwards-compatibility with earlier versions than Ruby v2.7.
- 'spec/unit/bosh_release/jobs/cpi/templates/cpi.json.erb_spec.rb'

# Offense count: 6
# Cop supports --auto-correct.
Style/BisectedAttrAccessor:
Exclude:
# Note: Excluding the following file for the reasons noted within its comments.
- 'lib/cloud/azure/models/vm_cloud_props.rb'

Style/CollectionCompact: # new in 1.2
Enabled: true
Expand All @@ -118,6 +136,13 @@ Style/HashConversion: # new in 1.10
Style/HashExcept: # new in 1.7
Enabled: true

# Offense count: 1
# Cop supports --auto-correct.
Style/HashTransformValues:
Exclude:
# Note: Excluding the following file since it seems like that file might need backwards-compatibility with earlier versions than Ruby v2.4.
- 'spec/unit/bosh_release/jobs/cpi/templates/cpi.json.erb_spec.rb'

Style/IfWithBooleanLiteralBranches: # new in 1.9
Enabled: true

Expand Down Expand Up @@ -158,4 +183,9 @@ Style/StringChars: # new in 1.12
Enabled: true

Style/SwapValues: # new in 1.1
Enabled: true
Enabled: true

# Cop supports --auto-correct.
# Configuration parameters: AllowNamedUnderscoreVariables.
Style/TrailingUnderscoreVariable:
Enabled: false # Note: This cop makes code harder to read, IMO.
Loading

0 comments on commit 4a066fa

Please sign in to comment.