diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-01-30 13:02:38 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-01-30 13:02:38 +0300 |
commit | 6fc5495703f2e9674cdda40826340be4a61047b6 (patch) | |
tree | b8cd1a2a207a9e43590f456eb3ffa9573cb385f7 /lib | |
parent | 59e69a56c59e9f528c8a172dea64d2b433b6056a (diff) | |
parent | ff0b2cc61fff18186572084790bb0a054090b917 (diff) |
Merge branch 'anan-add-MethodCallWithoutArgsParentheses-cop' into 'master'
Re-enable MethodCallWithoutArgsParentheses Cop
Closes #56795
See merge request gitlab-org/gitlab-ce!24631
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/ansi2html.rb | 18 | ||||
-rw-r--r-- | lib/gitlab/ci/trace/stream.rb | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/gitlab/ci/ansi2html.rb b/lib/gitlab/ci/ansi2html.rb index 974b5ad6877..4dcb3869d4f 100644 --- a/lib/gitlab/ci/ansi2html.rb +++ b/lib/gitlab/ci/ansi2html.rb @@ -31,7 +31,7 @@ module Gitlab end class Converter - def on_0(_) reset() end + def on_0(_) reset end def on_1(_) enable(STYLE_SWITCHES[:bold]) end @@ -177,7 +177,7 @@ module Gitlab end end - close_open_tags() + close_open_tags OpenStruct.new( html: @out.force_encoding(Encoding.default_external), @@ -194,7 +194,7 @@ module Gitlab action = scanner[1] timestamp = scanner[2] section = scanner[3] - line = scanner.matched()[0...-5] # strips \r\033[0K + line = scanner.matched[0...-5] # strips \r\033[0K @out << %{<div class="hidden" data-action="#{action}" data-timestamp="#{timestamp}" data-section="#{section}">#{line}</div>} end @@ -209,10 +209,10 @@ module Gitlab # sequence gets stripped (including stuff like "delete last line") return unless indicator == '[' && terminator == 'm' - close_open_tags() + close_open_tags - if commands.empty?() - reset() + if commands.empty? + reset return end @@ -222,7 +222,7 @@ module Gitlab end def evaluate_command_stack(stack) - return unless command = stack.shift() + return unless command = stack.shift if self.respond_to?("on_#{command}", true) self.__send__("on_#{command}", stack) # rubocop:disable GitlabSecurity/PublicSend @@ -333,8 +333,8 @@ module Gitlab return unless command_stack.length >= 2 return unless command_stack[0] == "5" - command_stack.shift() # ignore the "5" command - color_index = command_stack.shift().to_i + command_stack.shift # ignore the "5" command + color_index = command_stack.shift.to_i return unless color_index >= 0 return unless color_index <= 255 diff --git a/lib/gitlab/ci/trace/stream.rb b/lib/gitlab/ci/trace/stream.rb index 0f23b95ba15..e61fb50a303 100644 --- a/lib/gitlab/ci/trace/stream.rb +++ b/lib/gitlab/ci/trace/stream.rb @@ -46,7 +46,7 @@ module Gitlab stream.seek(offset, IO::SEEK_SET) stream.write(data) stream.truncate(offset + data.bytesize) - stream.flush() + stream.flush end def set(data) |