Last active
November 28, 2017 17:15
-
-
Save wellavelino/f1c0cda54317bee6647a3fba44ba3538 to your computer and use it in GitHub Desktop.
Simple output from lint class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lint.rb:1:1: W: Script file lint.rb doesn't have execute permission. | |
#!/usr/bin/env ruby | |
^^^^^^^^^^^^^^^^^^^ | |
lint.rb:2:1: C: Missing top-level class documentation comment. | |
class Lint | |
^^^^^ | |
lint.rb:3:1: C: Use 2 (not 0) spaces for indentation. | |
def get_even_numbers | |
lint.rb:3:5: C: Do not prefix reader method names with get_. | |
def get_even_numbers | |
^^^^^^^^^^^^^^^^ | |
lint.rb:5:3: C: Prefer each over for. | |
for number in numbers_list | |
^^^ | |
lint.rb:6:5: C: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. | |
if number % 2 == 0 | |
^^ | |
lint.rb:6:8: C: Replace with Integer#even?. | |
if number % 2 == 0 | |
^^^^^^^^^^^^^^^ | |
lint.rb:6:8: C: Use (number % 2).zero? instead of number % 2 == 0. | |
if number % 2 == 0 | |
^^^^^^^^^^^^^^^ | |
lint.rb:7:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
puts "Even number", number | |
^^^^^^^^^^^^^ | |
lint.rb:7:26: C: Unnecessary spacing detected. | |
puts "Even number", number | |
^ | |
1 Layout/ExtraSpacing | |
1 Layout/IndentationWidth | |
1 Lint/ScriptPermission | |
1 Naming/AccessorMethodName | |
1 Style/Documentation | |
1 Style/EvenOdd | |
1 Style/For | |
1 Style/IfUnlessModifier | |
1 Style/NumericPredicate | |
1 Style/StringLiterals | |
-- | |
10 Total | |
1 file inspected, 10 offenses detected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment