Showing 219 of 219 total issues
Trailing whitespace detected. Open
elsif input.is_a?(String)
- Exclude checks
Use 2 (not 0) spaces for indentation. Open
def convertDate(date, offset)
- 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
Use 2 (not 1) spaces for indentation. Open
doc.data['dateEnd'] = convertDate(event['time']+event['duration'],event['utc_offset'])
- 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
Tab detected. Open
return convertedDate
- Exclude checks
Tab detected. Open
raise
- Exclude checks
Tab detected. Open
end
- Exclude checks
Tab detected. Open
end
- Exclude checks
Tab detected. Open
@@meetup_groups = Jekyll.configuration({})['meetup_groups']
- Exclude checks
Replace class var @@timezone with a class instance var. Open
@@timezone = Jekyll.configuration({})['timezone']
- 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.
Trailing whitespace detected. Open
if input.is_a?(Time)
- Exclude checks
Surrounding space missing for operator +
. Open
doc.data['dateEnd'] = convertDate(event['time']+event['duration'],event['utc_offset'])
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Tab detected. Open
def convertDate(date, offset)
- Exclude checks
Tab detected. Open
if event['venue']
- Exclude checks
Tab detected. Open
else
- Exclude checks
Tab detected. Open
@@timezone = Jekyll.configuration({})['timezone']
- Exclude checks
Tab detected. Open
@@timezone = Jekyll.configuration({})['timezone']
- Exclude checks
Tab detected. Open
def generate(site)
- Exclude checks
end
at 71, 2 is not aligned with class
at 4, 1. Open
end
- Read upRead up
- Exclude checks
This cop checks whether the end keywords are aligned properly.
Three modes are supported through the EnforcedStyleAlignWith
configuration parameter:
If it's set to keyword
(which is the default), the end
shall be aligned with the start of the keyword (if, class, etc.).
If it's set to variable
the end
shall be aligned with the
left-hand-side of the variable assignment, if there is one.
If it's set to start_of_line
, the end
shall be aligned with the
start of the line where the matching keyword appears.
Example: EnforcedStyleAlignWith: keyword (default)
# bad
variable = if true
end
# good
variable = if true
end
Example: EnforcedStyleAlignWith: variable
# bad
variable = if true
end
# good
variable = if true
end
Example: EnforcedStyleAlignWith: startofline
# bad
variable = if true
end
# good
puts(if true
end)
Tab detected. Open
dateWithOffset = date + offset
- Exclude checks
The name of this source file (meetupFetcher.rb
) should use snake_case. Open
require 'meetup_client'
- 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