diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-15 16:28:37 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-15 16:28:37 +0300 |
commit | 6238d2dc3644194baf30a868248c617bf22883dd (patch) | |
tree | 503ba2c84110cc1c562a2c612cda0d0c691cf811 | |
parent | fa1d7aaa99d13278a83d955804077811bb65c553 (diff) | |
download | gitlab-ci-6238d2dc3644194baf30a868248c617bf22883dd.tar.gz |
Enable more rubocop rules
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | .rubocop.yml | 20 | ||||
-rw-r--r-- | lib/ansi2html.rb | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 999a70f..9bac68f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -355,7 +355,7 @@ Style/MultilineBlockChain: Style/MultilineBlockLayout: Description: 'Ensures newlines after multiline block do statements.' - Enabled: false + Enabled: true Style/MultilineIfThen: Description: 'Do not use then for multi-line if/unless.' @@ -390,7 +390,7 @@ Style/NegatedWhile: Style/NestedTernaryOperator: Description: 'Use one expression per branch in a ternary operator.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary' - Enabled: false + Enabled: true Style/Next: Description: 'Use `next` to skip iteration instead of a condition at the end.' @@ -400,17 +400,17 @@ Style/Next: Style/NilComparison: Description: 'Prefer x.nil? to x == nil.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods' - Enabled: false + Enabled: true Style/NonNilCheck: Description: 'Checks for redundant nil checks.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks' - Enabled: false + Enabled: true Style/Not: Description: 'Use ! instead of not.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not' - Enabled: false + Enabled: true Style/NumericLiterals: Description: >- @@ -424,7 +424,7 @@ Style/OneLineConditional: Favor the ternary operator(?:) over if/then/else/end constructs. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator' - Enabled: false + Enabled: true Style/OpMethod: Description: 'When defining binary operators, name the argument other.' @@ -436,7 +436,7 @@ Style/ParenthesesAroundCondition: Don't use parentheses around the condition of an if/unless/while. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if' - Enabled: false + Enabled: true Style/PercentLiteralDelimiters: Description: 'Use `%`-literal delimiters consistently' @@ -480,7 +480,7 @@ Style/RedundantException: Style/RedundantReturn: Description: "Don't use return where it's not required." StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return' - Enabled: false + Enabled: true Style/RedundantSelf: Description: "Don't use self where it's not needed." @@ -652,7 +652,7 @@ Style/SymbolProc: Style/Tab: Description: 'No hard tabs.' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation' - Enabled: false + Enabled: true Style/TrailingBlankLines: Description: 'Checks trailing blank lines and final newline.' @@ -877,7 +877,7 @@ Lint/ParenthesesAsGroupedExpression: Checks for method calls with a space before the opening parenthesis. StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces' - Enabled: false + Enabled: true Lint/RequireParentheses: Description: >- diff --git a/lib/ansi2html.rb b/lib/ansi2html.rb index 7e0c2a1..b85c85a 100644 --- a/lib/ansi2html.rb +++ b/lib/ansi2html.rb @@ -188,7 +188,7 @@ module Ansi2html color_name = COLOR[color_index] return nil if color_name.nil? - return get_color_class(["term", prefix, color_name]) + get_color_class(["term", prefix, color_name]) end def set_fg_color_256(command_stack) @@ -212,11 +212,11 @@ module Ansi2html return unless color_index >= 0 return unless color_index <= 255 - return get_color_class(["xterm", prefix, color_index]) + get_color_class(["xterm", prefix, color_index]) end def get_color_class(segments) - return [segments].flatten.compact.join('-') + [segments].flatten.compact.join('-') end end end |