Skip to content

Commit 6571703

Browse files
authored
Remove redundant semicolon (#4992)
**Which issue(s) this PR fixes**: Fixes # **What this PR does / why we need it**: This PR will removes unnecessary trailing semicolons to improve code style. **Docs Changes**: Not needed. **Release Note**: Code refactoring Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent e42097b commit 6571703

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

lib/fluent/plugin/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def acquire_worker_lock(name)
8484
yield
8585
end
8686
# Update access time to prevent tmpwatch from deleting a lock file.
87-
FileUtils.touch(lock_path);
87+
FileUtils.touch(lock_path)
8888
end
8989

9090
def string_safe_encoding(str)

test/log/test_console_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_args(level)
7373
def test_options(level)
7474
@console_logger.send(level, "subject", kwarg1: "opt1", kwarg2: "opt2")
7575
lines = @logdev.logs[0].split("\n")
76-
args = JSON.parse(lines[1..].collect { |str| str.sub(/\s+\|/, "") }.join("\n"));
76+
args = JSON.parse(lines[1..].collect { |str| str.sub(/\s+\|/, "") }.join("\n"))
7777
assert_equal([
7878
1,
7979
"#{@timestamp_str} [#{level}]: 0.0s: subject",

test/plugin/test_base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class FluentPluginBaseTest::DummyPlugin2 < Fluent::Plugin::TestBase
118118
Dir.mktmpdir("test-fluentd-lock-") do |lock_dir|
119119
ENV['FLUENTD_LOCK_DIR'] = lock_dir
120120
p = FluentPluginBaseTest::DummyPlugin.new
121-
path = p.get_lock_path("Aa\\|=~/_123");
121+
path = p.get_lock_path("Aa\\|=~/_123")
122122

123123
assert_equal lock_dir, File.dirname(path)
124124
assert_equal "fluentd-Aa______123.lock", File.basename(path)

test/plugin/test_output_as_buffered_backup.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def wait_flush(target_file)
195195
chunk_id = nil
196196
@i.configure(config_element('ROOT', '', {'@id' => id}, [config_element('buffer', 'tag', hash)]))
197197
@i.register(:write) { |chunk|
198-
chunk_id = chunk.unique_id;
198+
chunk_id = chunk.unique_id
199199
raise error_class, "yay, your #write must fail"
200200
}
201201

@@ -220,7 +220,7 @@ def wait_flush(target_file)
220220
secconf = config_element('secondary','',{'@type' => 'backup_output'})
221221
@i.configure(config_element('ROOT', '', {'@id' => id}, [config_element('buffer', 'tag', hash), secconf]))
222222
@i.register(:write) { |chunk|
223-
chunk_id = chunk.unique_id;
223+
chunk_id = chunk.unique_id
224224
raise Fluent::UnrecoverableError, "yay, your #write must fail"
225225
}
226226

@@ -242,7 +242,7 @@ def wait_flush(target_file)
242242
secconf = config_element('secondary', '', { '@type' => 'backup_output' })
243243
@i.configure(config_element('ROOT', '', { '@id' => id }, [config_element('buffer', 'tag', hash), secconf]))
244244
@i.register(:write) { |chunk|
245-
chunk_id = chunk.unique_id;
245+
chunk_id = chunk.unique_id
246246
raise Fluent::UnrecoverableError, "yay, your #write must fail"
247247
}
248248

@@ -267,7 +267,7 @@ def wait_flush(target_file)
267267
secconf = config_element('secondary', '', { '@type' => 'backup_output' })
268268
@i.configure(config_element('ROOT', '', { '@id' => id }, [config_element('buffer', 'tag', hash), secconf]))
269269
@i.register(:write) { |chunk|
270-
chunk_id = chunk.unique_id;
270+
chunk_id = chunk.unique_id
271271
raise Fluent::UnrecoverableError, "yay, your #write must fail"
272272
}
273273

@@ -293,7 +293,7 @@ def wait_flush(target_file)
293293
secconf = config_element('secondary','',{'@type' => 'backup_output2'})
294294
@i.configure(config_element('ROOT', '', {'@id' => id}, [config_element('buffer', 'tag', hash), secconf]))
295295
@i.register(:write) { |chunk|
296-
chunk_id = chunk.unique_id;
296+
chunk_id = chunk.unique_id
297297
raise Fluent::UnrecoverableError, "yay, your #write must fail"
298298
}
299299
@i.secondary.register(:write) { |chunk|
@@ -322,7 +322,7 @@ def wait_flush(target_file)
322322
secconf = config_element('secondary','',{'@type' => 'backup_async_output'})
323323
@i.configure(config_element('ROOT', '', {'@id' => id}, [config_element('buffer', 'tag', hash), secconf]))
324324
@i.register(:write) { |chunk|
325-
chunk_id = chunk.unique_id;
325+
chunk_id = chunk.unique_id
326326
raise Fluent::UnrecoverableError, "yay, your #write must fail"
327327
}
328328

@@ -347,7 +347,7 @@ def wait_flush(target_file)
347347
chunk_id = nil
348348
@i.configure(config_element('ROOT', '', {'@id' => id}, [config_element('buffer', 'tag', hash)]))
349349
@i.register(:write) { |chunk|
350-
chunk_id = chunk.unique_id;
350+
chunk_id = chunk.unique_id
351351
raise Fluent::UnrecoverableError, "yay, your #write must fail"
352352
}
353353

0 commit comments

Comments
 (0)