Showing 216 of 216 total issues
Line is too long. [98/80] Open
sandbox_org = @cf_client.create_organization(sandbox_org_name, org_quota["metadata"]["guid"])
- Exclude checks
Line is too long. [99/80] Open
!@cf_client.organization_space_name_exists?(sandbox_org['metadata']['guid'], user_space_name)
- Exclude checks
Extra empty line detected at method body end. Open
end
- Read upRead up
- Exclude checks
This cops checks if empty lines exist around the bodies of methods.
Example:
# good
def foo
# ...
end
# bad
def bar
# ...
end
Extra empty line detected at method body beginning. Open
space_quota_definition = nil
- Read upRead up
- Exclude checks
This cops checks if empty lines exist around the bodies of methods.
Example:
# good
def foo
# ...
end
# bad
def bar
# ...
end
Useless assignment to variable - quota
. Open
quota = response.parsed
- Read upRead up
- Exclude checks
This cop checks for every useless assignment to local variable in every
scope.
The basic idea for this cop was from the warning of ruby -cw
:
assigned but unused variable - foo
Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.
Example:
# bad
def some_method
some_var = 1
do_something
end
Example:
# good
def some_method
some_var = 1
do_something(some_var)
end
Line is too long. [106/80] Open
response = @token.get("#{api_url}/organizations/#{(org_guid)}/spaces?q=name:#{CGI.escape space_name}")
- Exclude checks
Don't use parentheses around a variable. Open
response = @token.get("#{api_url}/organizations/#{(org_guid)}/spaces")
- Read upRead up
- Exclude checks
This cop checks for redundant parentheses.
Example:
# bad
(x) if ((y.z).nil?)
# good
x if y.z.nil?
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
spaces = response.parsed["resources"]
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Align the parameters of a method call if they span more than one line. Open
sandbox_org_space_quota_definition['metadata']['guid'])
- Read upRead up
- Exclude checks
Here we check if the parameters on a multi-line method call or definition are aligned.
Example: EnforcedStyle: withfirstparameter (default)
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Example: EnforcedStyle: withfixedindentation
# good
foo :bar,
:baz
# bad
foo :bar,
:baz
Extra empty line detected at method body beginning. Open
return "https://api.#{@@domain_name}/v2"
- Read upRead up
- Exclude checks
This cops checks if empty lines exist around the bodies of methods.
Example:
# good
def foo
# ...
end
# bad
def bar
# ...
end
Extra empty line detected at method body end. Open
end
- Read upRead up
- Exclude checks
This cops checks if empty lines exist around the bodies of methods.
Example:
# good
def foo
# ...
end
# bad
def bar
# ...
end
Extra empty line detected at method body beginning. Open
response = @token.get("#{api_url}/quota_definitions")
- Read upRead up
- Exclude checks
This cops checks if empty lines exist around the bodies of methods.
Example:
# good
def foo
# ...
end
# bad
def bar
# ...
end
Use 2 (not 3) spaces for indentation. Open
@client = OAuth2::Client.new(
- Read upRead up
- Exclude checks
This cops checks for indentation that doesn't use the specified number of spaces.
See also the IndentationConsistency cop which is the companion to this one.
Example:
# bad
class A
def test
puts 'hello'
end
end
# good
class A
def test
puts 'hello'
end
end
Example: IgnoredPatterns: ['^\s*module']
# bad
module A
class B
def test
puts 'hello'
end
end
end
# good
module A
class B
def test
puts 'hello'
end
end
end
Useless assignment to variable - spaces
. Open
spaces = response.parsed["resources"]
- Read upRead up
- Exclude checks
This cop checks for every useless assignment to local variable in every
scope.
The basic idea for this cop was from the warning of ruby -cw
:
assigned but unused variable - foo
Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.
Example:
# bad
def some_method
some_var = 1
do_something
end
Example:
# good
def some_method
some_var = 1
do_something(some_var)
end
Line is too long. [132/80] Open
total_services: quota_total_services > computed_total_routes_services ? quota_total_services : computed_total_routes_services,
- Exclude checks
Line is too long. [126/80] Open
total_routes: quota_total_routes > computed_total_routes_services ? quota_total_routes : computed_total_routes_services,
- Exclude checks
Replace class var @@domain_name with a class instance var. Open
@@domain_name = ENV["DOMAIN_NAME"]
- Read upRead up
- Exclude checks
This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.
Line is too long. [81/80] Open
break if @last_user_date && @last_user_date >= user["metadata"]["created_at"]
- Exclude checks
Line is too long. [119/80] Open
@cf_client.get_organization_space_quota_definition_by_name(sandbox_org['metadata']['guid'], SANDBOX_QUOTA_NAME)
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
@cf_client = CFClient.new(ENV["CLIENT_ID"], ENV["CLIENT_SECRET"], ENV["UAA_URL"])
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"