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

Commits on May 11, 2016

  1. Add '_' prefix to block variables

    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
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    98c7c8c View commit details
    Browse the repository at this point in the history
  2. Add parentheses

    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.
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    c37ffb3 View commit details
    Browse the repository at this point in the history
  3. Remove an unused local variable

    This change suppresses following warning:
    
    lib/fluent/plugin/buffer/file_chunk.rb:174: warning: assigned but unused variable - pos
    okkez committed May 11, 2016
    Configuration menu
    Copy the full SHA
    b05e167 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2016

  1. Add "_" prefix to suppress warnings

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    966a563 View commit details
    Browse the repository at this point in the history
  2. Remove an unused local variable

    This change suppresses following warning:
    
    test/plugin/test_buffer.rb:573: warning: assigned but unused variable - prev_stage_size
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    2ae10a4 View commit details
    Browse the repository at this point in the history
  3. Use unused local variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    4c33847 View commit details
    Browse the repository at this point in the history
  4. Remove unused local variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    4998a24 View commit details
    Browse the repository at this point in the history
  5. Add "_" prefix to unused local variable

    This change suppresses following warning:
    
    lib/fluent/plugin/in_forward.rb:232: warning: assigned but unused variable - proto
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    768c1e4 View commit details
    Browse the repository at this point in the history
  6. Remove an unused variable

    This change suppresses following warnings:
    
    lib/fluent/plugin/in_forward.rb:245: warning: assigned but unused variable - e
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    8f8ac0a View commit details
    Browse the repository at this point in the history
  7. Comment out unused assignment

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    06ebb46 View commit details
    Browse the repository at this point in the history
  8. Fix parentheses

    This change suppresses following warnings:
    
    test/plugin/test_output.rb:92: warning: `*' interpreted as argument prefix
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    d688345 View commit details
    Browse the repository at this point in the history
  9. Fix parentheses

    This change suppresses following warnings:
    
    test/plugin/test_output_as_buffered.rb:87: warning: `*' interpreted as argument prefix
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    38f7015 View commit details
    Browse the repository at this point in the history
  10. Remove unused assignments

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    9c932eb View commit details
    Browse the repository at this point in the history
  11. Fix parentheses

    This change suppresses following warnings:
    
    test/plugin/test_output_as_buffered_retries.rb:70: warning: `*' interpreted as argument prefix
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    b037e0e View commit details
    Browse the repository at this point in the history
  12. Add "_" prefix to unused local variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    49748ad View commit details
    Browse the repository at this point in the history
  13. Fix parentheses

    This change suppresses following warnings:
    
    fluentd/test/plugin/test_output_as_buffered_secondary.rb:70: warning: `*' interpreted as argument prefix
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    1c7a5d5 View commit details
    Browse the repository at this point in the history
  14. Fix parentheses

    This change suppresses following warnings:
    
    test/plugin/test_output_as_standard.rb:53: warning: `*' interpreted as argument prefix
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    1376428 View commit details
    Browse the repository at this point in the history
  15. Remove unused local variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    1c95b14 View commit details
    Browse the repository at this point in the history
  16. Remove unused variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    4fe7496 View commit details
    Browse the repository at this point in the history
  17. Use initialized global/instance variables

    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)
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    3ea2e03 View commit details
    Browse the repository at this point in the history
  18. Remove unused local variable

    test/plugin/test_out_forward.rb:393: warning: assigned but unused variable - e
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    ba37d2d View commit details
    Browse the repository at this point in the history
  19. Use descriptive variable name

    This change suppress following warning:
    
    lib/fluent/plugin/out_forward.rb:125: warning: shadowing outer local variable - e
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    589395b View commit details
    Browse the repository at this point in the history
  20. Remove unused local variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    6d71ebf View commit details
    Browse the repository at this point in the history
  21. Check instance variable is defined before use it

    This change suppresses following warnings(177 lines)
    
    lib/fluent/configurable.rb:71: warning: instance variable @log_level not initialized
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    f722e5e View commit details
    Browse the repository at this point in the history
  22. Initialize uninitialized instance variable

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    0d21d86 View commit details
    Browse the repository at this point in the history
  23. Initialize uninitialized instance variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    166999e View commit details
    Browse the repository at this point in the history
  24. Initialize uninitialized instance variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    6779c8e View commit details
    Browse the repository at this point in the history
  25. Initialize uninitialized instance variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    1835e24 View commit details
    Browse the repository at this point in the history
  26. Check instance variable is defined before use it

    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 committed May 13, 2016
    Configuration menu
    Copy the full SHA
    ee4ce43 View commit details
    Browse the repository at this point in the history
  27. Check instance variable is defined before use it

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    92a94c4 View commit details
    Browse the repository at this point in the history
  28. Initialize Initialize uninitialized instance variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    02ea7af View commit details
    Browse the repository at this point in the history
  29. Use File.exist? instead of File.exists?

    test/plugin/test_buf_file.rb:681: warning: File.exists? is a deprecated name, use File.exist? instead
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    1f35d95 View commit details
    Browse the repository at this point in the history
  30. Add alias for :current_time

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    c71066b View commit details
    Browse the repository at this point in the history
  31. Initialize Initialize uninitialized instance variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    70b70ae View commit details
    Browse the repository at this point in the history
  32. Initialize Initialize uninitialized instance variables

    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
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    f87c232 View commit details
    Browse the repository at this point in the history
  33. Initialize Initialize uninitialized instance variables

    This change suppresses following warnings:
    
    test/plugin/test_output_as_standard.rb:69: warning: instance variable @i not initialized
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    97d1c9e View commit details
    Browse the repository at this point in the history
  34. Initialize Initialize uninitialized instance variables

    This change suppresses following warnings:
    
    lib/fluent/plugin/out_forward.rb:403: warning: instance variable @finished not initialized
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    5b32595 View commit details
    Browse the repository at this point in the history
  35. Use @bind instead of @host

    Because in_forward has option `bind` for this purpose.
    okkez committed May 13, 2016
    Configuration menu
    Copy the full SHA
    8b40e15 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    0a31ded View commit details
    Browse the repository at this point in the history