Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress warnings #946

Merged
merged 39 commits into from
May 13, 2016
Merged

Suppress warnings #946

merged 39 commits into from
May 13, 2016

Conversation

okkez
Copy link
Contributor

@okkez okkez commented May 12, 2016

In previous version about 2500 lines of warnings.
In this version about 1200 lines of warnings.

Remained warinigs:

okkez added 3 commits May 11, 2016 10:24
This change suppresses following warnings:

test/plugin/test_in_forward.rb:62: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:77: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:92: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:107: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:111: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:130: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:147: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:163: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:183: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:200: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:216: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:221: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:239: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:366: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:393: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:420: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:446: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:470: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:492: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:515: warning: shadowing outer local variable - time
test/plugin/test_in_forward.rb:537: warning: shadowing outer local variable - time
This change suppresses following warnings:

lib/fluent/plugin_helper.rb:35: warning: `*' interpreted as argument prefix

Rubocop says:
> Ambiguous splat operator. Parenthesize the method arguments if it's
> surely a splat operator, or add a whitespace to the right of the * if it
> should be a multiplication.
This change suppresses following warning:

lib/fluent/plugin/buffer/file_chunk.rb:174: warning: assigned but unused variable - pos
@@ -561,8 +561,8 @@ def handle_stream_with_standard_format(tag, es)
meta_and_data[meta].add(time, record)
records += 1
end
meta_and_data.each_pair do |meta, es|
Copy link
Member

@tagomoris tagomoris May 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these changes about meta_and_data: I'm fixing these on other branches.

okkez added 25 commits May 13, 2016 11:48
This change suppresses following warnings:

test/plugin/test_buffer.rb:237: warning: assigned but unused variable - m
test/plugin/test_buffer.rb:245: warning: assigned but unused variable - mx
This change suppresses following warning:

test/plugin/test_buffer.rb:573: warning: assigned but unused variable - prev_stage_size
This change suppresses following warnings:

test/plugin/test_buffer_file_chunk.rb:333: warning: assigned but unused variable - created_at
test/plugin/test_buffer_file_chunk.rb:334: warning: assigned but unused variable - modified_at
test/plugin/test_buffer_file_chunk.rb:457: warning: assigned but unused variable - created_at
test/plugin/test_buffer_file_chunk.rb:458: warning: assigned but unused variable - modified_at
This change suppresses following warnings:

test/plugin/test_filter.rb:221: warning: assigned but unused variable - data
test/plugin/test_filter.rb:222: warning: assigned but unused variable - dummy_error
This change suppresses following warning:

lib/fluent/plugin/in_forward.rb:232: warning: assigned but unused variable - proto
This change suppresses following warnings:

lib/fluent/plugin/in_forward.rb:245: warning: assigned but unused variable - e
Because we use `child_uri` below the here (in comment).

This change suppresses following warning:

lib/fluent/process.rb:119: warning: assigned but unused variable - child_uri
This change suppresses following warnings:

test/plugin/test_output.rb:92: warning: `*' interpreted as argument prefix
This change suppresses following warnings:

test/plugin/test_output_as_buffered.rb:87: warning: `*' interpreted as argument prefix
This change suppresses following warnings:

test/plugin/test_output_as_buffered.rb:255: warning: assigned but unused variable - event_size
test/plugin/test_output_as_buffered.rb:362: warning: assigned but unused variable - event_size
This change suppresses following warnings:

test/plugin/test_output_as_buffered_retries.rb:70: warning: `*' interpreted as argument prefix
This change suppresses following warnings:

test/plugin/test_output_as_buffered_retries.rb:356: warning: assigned but unused variable - first_failure
test/plugin/test_output_as_buffered_retries.rb:572: warning: assigned but unused variable - first_failure
This change suppresses following warnings:

fluentd/test/plugin/test_output_as_buffered_secondary.rb:70: warning: `*' interpreted as argument prefix
This change suppresses following warnings:

test/plugin/test_output_as_standard.rb:53: warning: `*' interpreted as argument prefix
This change suppresses following warnings:

test/plugin_helper/test_storage.rb:284: warning: assigned but unused variable - s
test/plugin_helper/test_storage.rb:296: warning: assigned but unused variable - s
This change suppresses following warnings:

test/plugin_helper/test_thread.rb:80: warning: assigned but unused variable - t1
test/plugin_helper/test_thread.rb:83: warning: assigned but unused variable - t2
test/plugin_helper/test_thread.rb:86: warning: assigned but unused variable - t3
This change suppresses following warnings(about 25 lines)

lib/fluent/system_config.rb:106: warning: global variable `$_system_config' not initialized
lib/fluent/system_config.rb:109: warning: instance variable @_system_config not initialized
lib/fluent/system_config.rb:114: warning: instance variable @_system_config not initialized
(snip)
test/plugin/test_out_forward.rb:393: warning: assigned but unused variable - e
This change suppress following warning:

lib/fluent/plugin/out_forward.rb:125: warning: shadowing outer local variable - e
This change suppresses following warnings:

lib/fluent/plugin/out_forward.rb:443: warning: assigned but unused variable - port
lib/fluent/plugin/out_forward.rb:443: warning: assigned but unused variable - host
This change suppresses following warnings(177 lines)

lib/fluent/configurable.rb:71: warning: instance variable @log_level not initialized
This change suppresses following warnings:

lib/fluent/plugin/buffer/file_chunk.rb:135: warning: instance variable @meta not initialized
lib/fluent/plugin/buffer/file_chunk.rb:135: warning: instance variable @meta not initialized
This change suppresses following warnings:

test/plugin/test_output_as_buffered_retries.rb:91: warning: instance variable @i not initialized
test/plugin/test_output_as_buffered_retries.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_retries.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_retries.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_retries.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_retries.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_retries.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_retries.rb:27: warning: instance variable @prefer_delayed_commit not initialized
This change suppresses following warnings:

test/plugin/test_output_as_buffered_secondary.rb:83: warning: instance variable @i not initialized
test/plugin/test_output_as_buffered_secondary.rb:83: warning: instance variable @i not initialized
test/plugin/test_output_as_buffered_secondary.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_secondary.rb:27: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output_as_buffered_secondary.rb:83: warning: instance variable @i not initialized
test/plugin/test_output_as_buffered_secondary.rb:83: warning: instance variable @i not initialized
This change suppresses following warnings (20lines):

test/plugin/test_output_as_buffered.rb:38: warning: instance variable @shutdown_hook not initialized
test/plugin/test_output_as_buffered.rb:24: warning: instance variable @Format not initialized
This change suppresses following warnings(about 500 lines or more):

lib/fluent/plugin/owned_by_mixin.rb:30: warning: instance variable @_owner not initialized
lib/fluent/plugin/owned_by_mixin.rb:34: warning: instance variable @log not initialized
okkez added 10 commits May 13, 2016 12:36
This change suppresses following warnings(50 lines):

lib/fluent/plugin_id.rb:54: warning: instance variable @id not initialized
lib/fluent/plugin_id.rb:50: warning: instance variable @_id_configured not initialized
This change suppresses following warnings:

test/config/test_system_config.rb:87: warning: instance variable @file_permission not initialized
test/config/test_system_config.rb:88: warning: instance variable @dir_permission not initialized
test/config/test_system_config.rb:87: warning: instance variable @file_permission not initialized
test/config/test_system_config.rb:88: warning: instance variable @dir_permission not initialized
test/config/test_system_config.rb:52: warning: instance variable @file_permission not initialized
test/config/test_system_config.rb:53: warning: instance variable @dir_permission not initialized
test/plugin/test_buf_file.rb:681: warning: File.exists? is a deprecated name, use File.exist? instead
This change suppress following warnings(138 lines):

test/plugin_helper/test_retry_state.rb:10: warning: method redefined; discarding old current_time
test/plugin_helper/test_retry_state.rb:10: warning: previous definition of current_time was here
This change suppresses following warnings:

test/plugin/test_out_forward.rb:451: warning: instance variable @loop not initialized
test/plugin/test_out_forward.rb:452: warning: instance variable @thread not initialized
lib/fluent/plugin/in_forward.rb:291: warning: instance variable @source not initialized
lib/fluent/plugin/in_forward.rb:291: warning: instance variable @source not initialized
lib/fluent/plugin/out_forward.rb:401: warning: instance variable @finished not initialized
lib/fluent/plugin/in_forward.rb:291: warning: instance variable @source not initialized
lib/fluent/plugin/in_forward.rb:291: warning: instance variable @source not initialized
lib/fluent/plugin/in_forward.rb:291: warning: instance variable @source not initialized
lib/fluent/plugin/in_forward.rb:291: warning: instance variable @source not initialized
lib/fluent/plugin/in_forward.rb:291: warning: instance variable @source not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
lib/fluent/plugin/socket_util.rb:61: warning: instance variable @timeout not initialized
This change suppresses following warnings:

test/plugin/test_output.rb:52: warning: instance variable @prefer_delayed_commit not initialized
test/plugin/test_output.rb:58: warning: instance variable @Format not initialized
test/plugin/test_output.rb:58: warning: instance variable @Format not initialized
test/plugin/test_output.rb:58: warning: instance variable @Format not initialized
test/plugin/test_output.rb:58: warning: instance variable @Format not initialized
test/plugin/test_output.rb:36: warning: instance variable @Format not initialized
test/plugin/test_output.rb:36: warning: instance variable @Format not initialized
test/plugin/test_output.rb:23: warning: instance variable @Format not initialized
test/plugin/test_output.rb:23: warning: instance variable @Format not initialized
test/plugin/test_output.rb:49: warning: instance variable @prefer_buffered_processing not initialized
This change suppresses following warnings:

test/plugin/test_output_as_standard.rb:69: warning: instance variable @i not initialized
This change suppresses following warnings:

lib/fluent/plugin/out_forward.rb:403: warning: instance variable @finished not initialized
Because in_forward has option `bind` for this purpose.
@okkez
Copy link
Contributor Author

okkez commented May 13, 2016

I've pushed commits and rebased for all comments.

@tagomoris
Copy link
Member

Great!

@tagomoris tagomoris merged commit 6826156 into fluent:master May 13, 2016
@okkez okkez deleted the suppress-warnings-step3 branch May 13, 2016 06:05
@okkez
Copy link
Contributor Author

okkez commented May 13, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants