ikuseiGmbH/Goldencobra

View on GitHub
lib/tasks/travis.rake

Summary

Maintainability
Test Coverage

Final newline missing.
Open

end
Severity: Minor
Found in lib/tasks/travis.rake by rubocop

This cop looks for trailing blank lines and a final newline in the source code.

Example: EnforcedStyle: finalblankline

# `final_blank_line` looks for one blank line followed by a new line
# at the end of files.

# bad
class Foo; end
# EOF

# bad
class Foo; end # EOF

# good
class Foo; end

# EOF

Example: EnforcedStyle: final_newline (default)

# `final_newline` looks for one newline at the end of files.

# bad
class Foo; end

# EOF

# bad
class Foo; end # EOF

# good
class Foo; end
# EOF

Prefer $CHILD_STATUS from the stdlib 'English' module (don't forget to require it) over $?.
Open

    raise "#{cmd} failed!" unless $?.exitstatus == 0
Severity: Minor
Found in lib/tasks/travis.rake by rubocop

This cop looks for uses of Perl-style global variables.

Example: EnforcedStyle: useenglishnames (default)

# good
puts $LOAD_PATH
puts $LOADED_FEATURES
puts $PROGRAM_NAME
puts $ERROR_INFO
puts $ERROR_POSITION
puts $FIELD_SEPARATOR # or $FS
puts $OUTPUT_FIELD_SEPARATOR # or $OFS
puts $INPUT_RECORD_SEPARATOR # or $RS
puts $OUTPUT_RECORD_SEPARATOR # or $ORS
puts $INPUT_LINE_NUMBER # or $NR
puts $LAST_READ_LINE
puts $DEFAULT_OUTPUT
puts $DEFAULT_INPUT
puts $PROCESS_ID # or $PID
puts $CHILD_STATUS
puts $LAST_MATCH_INFO
puts $IGNORECASE
puts $ARGV # or ARGV
puts $MATCH
puts $PREMATCH
puts $POSTMATCH
puts $LAST_PAREN_MATCH

Example: EnforcedStyle: useperlnames

# good
puts $:
puts $"
puts $0
puts $!
puts $@
puts $;
puts $,
puts $/
puts $\
puts $.
puts $_
puts $>
puts $<
puts $$
puts $?
puts $~
puts $=
puts $*
puts $&
puts $`
puts $'
puts $+

Use $?.exitstatus.zero? instead of $?.exitstatus == 0.
Open

    raise "#{cmd} failed!" unless $?.exitstatus == 0
Severity: Minor
Found in lib/tasks/travis.rake by rubocop

This cop checks for usage of comparison operators (==, >, <) to test numbers as zero, positive, or negative. These can be replaced by their respective predicate methods. The cop can also be configured to do the reverse.

The cop disregards #nonzero? as it its value is truthy or falsey, but not true and false, and thus not always interchangeable with != 0.

The cop ignores comparisons to global variables, since they are often populated with objects which can be compared with integers, but are not themselves Integer polymorphic.

Example: EnforcedStyle: predicate (default)

# bad

foo == 0
0 > foo
bar.baz > 0

# good

foo.zero?
foo.negative?
bar.baz.positive?

Example: EnforcedStyle: comparison

# bad

foo.zero?
foo.negative?
bar.baz.positive?

# good

foo == 0
0 > foo
bar.baz > 0

There are no issues that match your filters.

Category
Status