Showing 34 of 34 total issues
Do not use spaces inside percent literal delimiters. Open
Open
gem.require_paths = %w[ lib ]
- Read upRead up
- Exclude checks
Checks for unnecessary additional spaces inside the delimiters of %i/%w/%x literals.
Example:
# good
%i(foo bar baz)
# bad
%w( foo bar baz )
# bad
%x( ls -l )
Line is too long. [90/80] Open
Open
@resources = @data.map { |row| Resource.new('data' => row) } if @data.is_a?(Array)
- Exclude checks
Do not use space inside array brackets. Open
Open
gem.authors = [ "Maciej Skierkowski" ]
- Read upRead up
- Exclude checks
Checks that brackets used for array literals have or don't have surrounding space depending on configuration.
Example: EnforcedStyle: space
# The `space` style enforces that array literals have
# surrounding space.
# bad
array = [a, b, c, d]
# good
array = [ a, b, c, d ]
Example: EnforcedStyle: no_space
# The `no_space` style enforces that array literals have
# no surrounding space.
# bad
array = [ a, b, c, d ]
# good
array = [a, b, c, d]
Example: EnforcedStyle: compact
# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.
# bad
array = [ a, [ b, c ] ]
# good
array = [ a, [ b, c ]]
Final newline missing. Open
Open
end
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
$:.push File.expand_path("../lib", __FILE__)
- 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"
The name of this source file (terraform-enterprise.rb
) should use snake_case. Open
Open
require 'terraform_enterprise'
- Read upRead up
- Exclude checks
This cop makes sure that Ruby source files have snake_case names. Ruby scripts (i.e. source files with a shebang in the first line) are ignored.
Example:
# bad
lib/layoutManager.rb
anything/usingCamelCase
# good
lib/layout_manager.rb
anything/using_snake_case.rake
Line is too long. [88/80] Open
Open
filter[:organization] = { name: params[:organization] } if params[:organization]
- Exclude checks
Final newline missing. Open
Open
require 'terraform_enterprise'
- Exclude checks
Prefer $LOAD_PATH
over $:
. Open
Open
$:.push File.expand_path("../lib", __FILE__)
- Exclude checks
Final newline missing. Open
Open
require 'terraform_enterprise'
- Exclude checks
Add an empty line after magic comments. Open
Open
$:.push File.expand_path("../lib", __FILE__)
- Read upRead up
- Exclude checks
Checks for a newline after the final magic comment.
Example:
# good
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
Trailing whitespace detected. Open
Open
gem.required_ruby_version = '>= 2.3.0'
- Exclude checks
Final newline missing. Open
Open
require 'terraform_enterprise'
- Exclude checks
Do not use space inside array brackets. Open
Open
gem.authors = [ "Maciej Skierkowski" ]
- Read upRead up
- Exclude checks
Checks that brackets used for array literals have or don't have surrounding space depending on configuration.
Example: EnforcedStyle: space
# The `space` style enforces that array literals have
# surrounding space.
# bad
array = [a, b, c, d]
# good
array = [ a, b, c, d ]
Example: EnforcedStyle: no_space
# The `no_space` style enforces that array literals have
# no surrounding space.
# bad
array = [ a, b, c, d ]
# good
array = [a, b, c, d]
Example: EnforcedStyle: compact
# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.
# bad
array = [ a, [ b, c ] ]
# good
array = [ a, [ b, c ]]