|
| 1 | +plugins: |
| 2 | + - rubocop-performance |
| 3 | + |
| 4 | +AllCops: |
| 5 | + Exclude: |
| 6 | + - 'vendor/**/*' |
| 7 | + NewCops: enable |
| 8 | + SuggestExtensions: false |
| 9 | + TargetRubyVersion: 3.4 |
| 10 | + |
| 11 | +# |
| 12 | +# Policy: Check Security & Performance in primary use-cases |
| 13 | +# (Disable most of cosmetic rules) |
| 14 | +# |
| 15 | + |
| 16 | +Lint: |
| 17 | + Enabled: false |
| 18 | + |
| 19 | +Style: |
| 20 | + Enabled: false |
| 21 | + |
| 22 | +Gemspec: |
| 23 | + Enabled: false |
| 24 | + |
| 25 | +Naming: |
| 26 | + Enabled: false |
| 27 | + |
| 28 | +Layout: |
| 29 | + Enabled: false |
| 30 | + |
| 31 | +Metrics: |
| 32 | + Enabled: false |
| 33 | + |
| 34 | +Security: |
| 35 | + Enabled: true |
| 36 | + |
| 37 | +Performance: |
| 38 | + Enabled: true |
| 39 | + |
| 40 | +# |
| 41 | +# False positive or exceptional cases |
| 42 | +# |
| 43 | + |
| 44 | +# False positive because it's intentional |
| 45 | +Security/Open: |
| 46 | + Exclude: |
| 47 | + - lib/fluent/plugin/buffer/chunk.rb |
| 48 | + Enabled: true |
| 49 | + |
| 50 | +# False positive because it's intentional |
| 51 | +Security/Eval: |
| 52 | + Exclude: |
| 53 | + - lib/fluent/plugin.rb |
| 54 | + - lib/fluent/plugin/in_debug_agent.rb |
| 55 | + Enabled: true |
| 56 | + |
| 57 | +# False positive because send method must accept literals. |
| 58 | +Performance/StringIdentifierArgument: |
| 59 | + Exclude: |
| 60 | + - test/plugin/test_in_tcp.rb |
| 61 | + - test/plugin/test_in_udp.rb |
| 62 | + - test/counter/test_server.rb |
| 63 | + - test/plugin/test_out_forward.rb |
| 64 | + - lib/fluent/plugin/out_forward.rb |
| 65 | + Enabled: true |
| 66 | + |
| 67 | +Performance/StringInclude: |
| 68 | + Exclude: |
| 69 | + - 'test/**/*' |
| 70 | + # It was not improved with String#include? |
| 71 | + - lib/fluent/command/plugin_config_formatter.rb |
| 72 | + Enabled: true |
| 73 | + |
| 74 | +# False positive for include? against constant ranges. |
| 75 | +# Almost same between include? and cover?. |
| 76 | +# See https://github.com/rubocop/rubocop-jp/issues/20 |
| 77 | +Performance/RangeInclude: |
| 78 | + Exclude: |
| 79 | + - lib/fluent/plugin/parser_multiline.rb |
| 80 | + Enabled: true |
| 81 | + |
| 82 | +# Allow using &method(:func) |
| 83 | +Performance/MethodObjectAsBlock: |
| 84 | + Exclude: |
| 85 | + - 'test/**/*' |
| 86 | + Enabled: false |
| 87 | + |
| 88 | +# Allow block.call |
| 89 | +Performance/RedundantBlockCall: |
| 90 | + Exclude: |
| 91 | + - 'test/**/*' |
| 92 | + - 'lib/fluent/plugin_helper/*.rb' |
| 93 | + - 'lib/fluent/plugin/*.rb' |
| 94 | + - 'lib/fluent/compat/*.rb' |
| 95 | + - 'lib/fluent/config/*.rb' |
| 96 | + - 'lib/fluent/*.rb' |
| 97 | + Enabled: true |
| 98 | + |
| 99 | +# |
| 100 | +# TODO: low priority to be fixed |
| 101 | +# |
| 102 | +Performance/ConstantRegexp: |
| 103 | + Exclude: |
| 104 | + - 'test/**/*' |
| 105 | + Enabled: true |
| 106 | + |
| 107 | +Performance/Sum: |
| 108 | + Exclude: |
| 109 | + - 'test/**/*' |
| 110 | + Enabled: true |
| 111 | + |
| 112 | +Performance/CollectionLiteralInLoop: |
| 113 | + Exclude: |
| 114 | + - 'test/**/*' |
| 115 | + Enabled: true |
0 commit comments