fluent / fluentd

Fluentd: Unified Logging Layer (project under CNCF)
https://www.fluentd.org
Apache License 2.0
12.86k stars 1.34k forks source link

Suppress non-parenthesis warnings #4590

Closed Watson1978 closed 1 month ago

Watson1978 commented 1 month ago

Which issue(s) this PR fixes: Fixes #

What this PR does / why we need it: This patch will suppress following warnings:

$ ruby -w -I"lib:test" test/plugin/test_out_http.rb
test/plugin/test_out_http.rb:445: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:446: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:482: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
test/plugin/test_out_http.rb:483: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator

Seems we will see this warning If we omit the parentheses in the method and pass a regular expression as an argument.

irb(main):001> $VERBOSE=true
=> true
irb(main):002> p /m/
(irb):2: warning: ambiguity between regexp and two divisions: wrap regexp in parentheses or add a space after `/' operator
/m/
=> /m/

Docs Changes:

Release Note:

daipom commented 1 month ago

These tests are for sigv4 feature, which is added in v1.17.0:

So, we don't need to backport this.