[Ruby] Fix obsolete configuration of Rubocop and Rubocop's warns (#5417) (#5474)

* fix obsolute configuration in generated .rubocop.yml

* fix style of `expect` with block in generated ruby client's test code

* update sample of ruby client
This commit is contained in:
Akira Tanimura 2020-02-28 21:36:25 +09:00 committed by GitHub
parent 40cbbbfefd
commit cc20eb8109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 24 additions and 54 deletions

View File

@ -14,12 +14,6 @@ AllCops:
Style/AndOr:
Enabled: true
# Do not use braces for hash literals when they are the last argument of a
# method call.
Style/BracesAroundHashParameters:
Enabled: true
EnforcedStyle: context_dependent
# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true
@ -46,7 +40,7 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
Enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
@ -57,7 +51,7 @@ Style/HashSyntax:
# extra level of indentation.
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
EnforcedStyle: indented_internal_methods
# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
@ -123,7 +117,7 @@ Layout/Tab:
Enabled: true
# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Enabled: true
# No trailing whitespace.
@ -131,7 +125,7 @@ Layout/TrailingWhitespace:
Enabled: false
# Use quotes for string literals when they are enough.
Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: true
# Align `end` with the matching keyword or starting expression except for

View File

@ -14,12 +14,6 @@ AllCops:
Style/AndOr:
Enabled: true
# Do not use braces for hash literals when they are the last argument of a
# method call.
Style/BracesAroundHashParameters:
Enabled: true
EnforcedStyle: context_dependent
# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true
@ -46,7 +40,7 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
Enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
@ -57,7 +51,7 @@ Style/HashSyntax:
# extra level of indentation.
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
EnforcedStyle: indented_internal_methods
# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
@ -123,7 +117,7 @@ Layout/Tab:
Enabled: true
# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Enabled: true
# No trailing whitespace.
@ -131,7 +125,7 @@ Layout/TrailingWhitespace:
Enabled: false
# Use quotes for string literals when they are enough.
Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: true
# Align `end` with the matching keyword or starting expression except for

View File

@ -14,12 +14,6 @@ AllCops:
Style/AndOr:
Enabled: true
# Do not use braces for hash literals when they are the last argument of a
# method call.
Style/BracesAroundHashParameters:
Enabled: true
EnforcedStyle: context_dependent
# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true
@ -46,7 +40,7 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
Enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
@ -57,7 +51,7 @@ Style/HashSyntax:
# extra level of indentation.
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
EnforcedStyle: indented_internal_methods
# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
@ -123,7 +117,7 @@ Layout/Tab:
Enabled: true
# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Enabled: true
# No trailing whitespace.
@ -131,7 +125,7 @@ Layout/TrailingWhitespace:
Enabled: false
# Use quotes for string literals when they are enough.
Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: true
# Align `end` with the matching keyword or starting expression except for

View File

@ -14,12 +14,6 @@ AllCops:
Style/AndOr:
Enabled: true
# Do not use braces for hash literals when they are the last argument of a
# method call.
Style/BracesAroundHashParameters:
Enabled: true
EnforcedStyle: context_dependent
# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true
@ -46,7 +40,7 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
Enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
@ -57,7 +51,7 @@ Style/HashSyntax:
# extra level of indentation.
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
EnforcedStyle: indented_internal_methods
# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
@ -123,7 +117,7 @@ Layout/Tab:
Enabled: true
# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Enabled: true
# No trailing whitespace.
@ -131,7 +125,7 @@ Layout/TrailingWhitespace:
Enabled: false
# Use quotes for string literals when they are enough.
Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: true
# Align `end` with the matching keyword or starting expression except for

View File

@ -14,12 +14,6 @@ AllCops:
Style/AndOr:
Enabled: true
# Do not use braces for hash literals when they are the last argument of a
# method call.
Style/BracesAroundHashParameters:
Enabled: true
EnforcedStyle: context_dependent
# Align `when` with `case`.
Layout/CaseIndentation:
Enabled: true
@ -46,7 +40,7 @@ Layout/EmptyLinesAroundMethodBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: true
Layout/IndentFirstArgument:
Layout/FirstArgumentIndentation:
Enabled: true
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
@ -57,7 +51,7 @@ Style/HashSyntax:
# extra level of indentation.
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
EnforcedStyle: indented_internal_methods
# Two spaces, no tabs (for indentation).
Layout/IndentationWidth:
@ -123,7 +117,7 @@ Layout/Tab:
Enabled: true
# Blank lines should not have any spaces.
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Enabled: true
# No trailing whitespace.
@ -131,7 +125,7 @@ Layout/TrailingWhitespace:
Enabled: false
# Use quotes for string literals when they are enough.
Style/UnneededPercentQ:
Style/RedundantPercentQ:
Enabled: true
# Align `end` with the matching keyword or starting expression except for