Skip to content

Commit

Permalink
Fix indentations (fluent#4587)
Browse files Browse the repository at this point in the history
This patch may slightly improve the code readability.

Signed-off-by: Watson <[email protected]>
  • Loading branch information
Watson1978 authored Aug 15, 2024
1 parent 5618dd0 commit 1be2f6c
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions lib/fluent/command/cap_ctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def call
parse_options!(@argv)

target_file = if !!@opts[:target_file]
@opts[:target_file]
else
File.readlink("/proc/self/exe")
end
@opts[:target_file]
else
File.readlink("/proc/self/exe")
end

if @opts[:clear_capabilities]
clear_capabilities(@opts, target_file)
Expand Down
2 changes: 1 addition & 1 deletion lib/fluent/plugin/in_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def on_body(chunk)
# Azure App Service sends GET requests for health checking purpose.
# Respond with `200 OK` to accommodate it.
def handle_get_request
return send_response_and_close(RES_200_STATUS, {}, "")
return send_response_and_close(RES_200_STATUS, {}, "")
end

# Web browsers can send an OPTIONS request before performing POST
Expand Down
2 changes: 1 addition & 1 deletion lib/fluent/plugin/out_copy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def gen_copy_proc

case @copy_mode
when :no_copy
nil
nil
when :shallow
Proc.new { |es| es.dup }
when :deep
Expand Down
6 changes: 3 additions & 3 deletions test/helpers/fuzzy_assert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def assert_same_value

def assert_same_class
if @expected.class != @actual.class
if (@expected.class.ancestors | @actual.class.ancestors).empty?
assert_equal(@expected.class, @actual.class, @message)
end
if (@expected.class.ancestors | @actual.class.ancestors).empty?
assert_equal(@expected.class, @actual.class, @message)
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/plugin/test_buf_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def write_metadata(path, chunk_id, metadata, size, ctime, mtime)
m = metadata()
c = nil
Fluent::SystemConfig.overwrite_system_config("file_permission" => "700") do
c = plugin.generate_chunk(m)
c = plugin.generate_chunk(m)
end

assert c.is_a? Fluent::Plugin::Buffer::FileChunk
Expand Down
2 changes: 1 addition & 1 deletion test/plugin/test_in_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
require 'timecop'

class ForwardInputTest < Test::Unit::TestCase
include Fluent::Plugin::Compressable
include Fluent::Plugin::Compressable

def setup
Fluent::Test.setup
Expand Down
4 changes: 2 additions & 2 deletions test/plugin/test_out_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,9 @@ def run_and_check(d, symlink_path)
end
path = d.instance.last_written_path
assert_equal "#{TMP_DIR}/out_file_test.2011-01-02-13.log", path
end
end

test '*' do
test '*' do
d = create_driver(%[
path #{TMP_DIR}/out_file_test.*.txt
time_slice_format %Y-%m-%d-%H
Expand Down
16 changes: 8 additions & 8 deletions test/plugin/test_output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ def try_write(chunk)
end

class OutputTest < Test::Unit::TestCase
class << self
def startup
$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '../scripts'))
require 'fluent/plugin/out_test'
end
class << self
def startup
$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '../scripts'))
require 'fluent/plugin/out_test'
end

def shutdown
$LOAD_PATH.shift
end
def shutdown
$LOAD_PATH.shift
end
end

def create_output(type=:full)
case type
Expand Down
4 changes: 2 additions & 2 deletions test/test_log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ def test_log_rotates_specified_size_with_logdevio
assert_true File.exist?(path0)
assert_true !File.exist?(path1)
ensure
logdev&.close
end
logdev&.close
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_root_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def setup_root_agent(conf)
end

begin
@ra.handle_emits_error("tag", nil, e)
@ra.handle_emits_error("tag", nil, e)
rescue
end

Expand Down

0 comments on commit 1be2f6c

Please sign in to comment.