newrelic_rpm 6.8.0.360 → 8.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (440) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +14 -1
  3. data/.rubocop.yml +1817 -0
  4. data/.rubocop_todo.yml +59 -0
  5. data/.simplecov +15 -0
  6. data/.snyk +11 -0
  7. data/.yardopts +1 -0
  8. data/Brewfile +12 -0
  9. data/CHANGELOG.md +1142 -15
  10. data/CONTRIBUTING.md +133 -19
  11. data/DOCKER.md +167 -0
  12. data/Dockerfile +10 -0
  13. data/Gemfile +5 -2
  14. data/Guardfile +18 -6
  15. data/LICENSE +202 -38
  16. data/README.md +84 -87
  17. data/Rakefile +27 -27
  18. data/THIRD_PARTY_NOTICES.md +28 -0
  19. data/Thorfile +5 -0
  20. data/bin/newrelic +3 -2
  21. data/bin/newrelic_cmd +1 -0
  22. data/bin/nrdebug +77 -54
  23. data/config.dot +5 -5
  24. data/docker-compose.yml +107 -0
  25. data/init.rb +5 -7
  26. data/install.rb +3 -3
  27. data/lefthook.yml +9 -0
  28. data/lib/new_relic/agent/adaptive_sampler.rb +14 -10
  29. data/lib/new_relic/agent/agent/shutdown.rb +35 -0
  30. data/lib/new_relic/agent/agent/special_startup.rb +72 -0
  31. data/lib/new_relic/agent/agent/start_worker_thread.rb +163 -0
  32. data/lib/new_relic/agent/agent/startup.rb +197 -0
  33. data/lib/new_relic/agent/agent.rb +199 -562
  34. data/lib/new_relic/agent/agent_logger.rb +24 -20
  35. data/lib/new_relic/agent/attribute_filter.rb +67 -48
  36. data/lib/new_relic/agent/attribute_processing.rb +8 -8
  37. data/lib/new_relic/agent/attributes.rb +9 -8
  38. data/lib/new_relic/agent/audit_logger.rb +19 -4
  39. data/lib/new_relic/agent/autostart.rb +21 -20
  40. data/lib/new_relic/agent/chained_call.rb +2 -2
  41. data/lib/new_relic/agent/commands/agent_command.rb +4 -4
  42. data/lib/new_relic/agent/commands/agent_command_router.rb +13 -12
  43. data/lib/new_relic/agent/commands/thread_profiler_session.rb +10 -8
  44. data/lib/new_relic/agent/configuration/default_source.rb +1731 -1143
  45. data/lib/new_relic/agent/configuration/dotted_hash.rb +7 -6
  46. data/lib/new_relic/agent/configuration/environment_source.rb +12 -10
  47. data/lib/new_relic/agent/configuration/event_harvest_config.rb +41 -18
  48. data/lib/new_relic/agent/configuration/high_security_source.rb +10 -9
  49. data/lib/new_relic/agent/configuration/manager.rb +83 -70
  50. data/lib/new_relic/agent/configuration/manual_source.rb +2 -2
  51. data/lib/new_relic/agent/configuration/mask_defaults.rb +4 -4
  52. data/lib/new_relic/agent/configuration/security_policy_source.rb +91 -78
  53. data/lib/new_relic/agent/configuration/server_source.rb +23 -21
  54. data/lib/new_relic/agent/configuration/yaml_source.rb +33 -9
  55. data/lib/new_relic/agent/configuration.rb +2 -2
  56. data/lib/new_relic/agent/connect/request_builder.rb +19 -19
  57. data/lib/new_relic/agent/connect/response_handler.rb +6 -9
  58. data/lib/new_relic/agent/custom_event_aggregator.rb +15 -15
  59. data/lib/new_relic/agent/database/explain_plan_helpers.rb +5 -6
  60. data/lib/new_relic/agent/database/obfuscation_helpers.rb +16 -15
  61. data/lib/new_relic/agent/database/obfuscator.rb +3 -3
  62. data/lib/new_relic/agent/database/postgres_explain_obfuscator.rb +4 -4
  63. data/lib/new_relic/agent/database.rb +55 -50
  64. data/lib/new_relic/agent/database_adapter.rb +35 -0
  65. data/lib/new_relic/agent/datastores/metric_helper.rb +18 -19
  66. data/lib/new_relic/agent/datastores/mongo/event_formatter.rb +8 -7
  67. data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +7 -11
  68. data/lib/new_relic/agent/datastores/mongo.rb +7 -12
  69. data/lib/new_relic/agent/datastores/nosql_obfuscator.rb +41 -0
  70. data/lib/new_relic/agent/datastores/redis.rb +6 -12
  71. data/lib/new_relic/agent/datastores.rb +12 -14
  72. data/lib/new_relic/agent/deprecator.rb +2 -2
  73. data/lib/new_relic/agent/{cross_app_payload.rb → distributed_tracing/cross_app_payload.rb} +13 -12
  74. data/lib/new_relic/agent/{cross_app_tracing.rb → distributed_tracing/cross_app_tracing.rb} +86 -64
  75. data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +84 -0
  76. data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +75 -0
  77. data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +163 -0
  78. data/lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb +38 -0
  79. data/lib/new_relic/agent/distributed_tracing/trace_context.rb +245 -0
  80. data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +127 -0
  81. data/lib/new_relic/agent/distributed_tracing.rb +113 -32
  82. data/lib/new_relic/agent/encoding_normalizer.rb +5 -3
  83. data/lib/new_relic/agent/error_collector.rb +98 -62
  84. data/lib/new_relic/agent/error_event_aggregator.rb +9 -8
  85. data/lib/new_relic/agent/error_filter.rb +174 -0
  86. data/lib/new_relic/agent/error_trace_aggregator.rb +5 -4
  87. data/lib/new_relic/agent/event_aggregator.rb +23 -22
  88. data/lib/new_relic/agent/event_buffer.rb +8 -9
  89. data/lib/new_relic/agent/event_listener.rb +2 -3
  90. data/lib/new_relic/agent/event_loop.rb +26 -24
  91. data/lib/new_relic/agent/external.rb +19 -52
  92. data/lib/new_relic/agent/guid_generator.rb +5 -12
  93. data/lib/new_relic/agent/harvester.rb +5 -6
  94. data/lib/new_relic/agent/heap.rb +7 -9
  95. data/lib/new_relic/agent/hostname.rb +21 -8
  96. data/lib/new_relic/agent/http_clients/abstract.rb +81 -0
  97. data/lib/new_relic/agent/http_clients/curb_wrappers.rb +26 -26
  98. data/lib/new_relic/agent/http_clients/excon_wrappers.rb +31 -17
  99. data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +18 -23
  100. data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +12 -15
  101. data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +24 -8
  102. data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +9 -12
  103. data/lib/new_relic/agent/http_clients/uri_util.rb +12 -13
  104. data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +12 -14
  105. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +43 -32
  106. data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +21 -14
  107. data/lib/new_relic/agent/instrumentation/active_job.rb +15 -8
  108. data/lib/new_relic/agent/instrumentation/active_merchant.rb +21 -7
  109. data/lib/new_relic/agent/instrumentation/active_record.rb +89 -40
  110. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +82 -61
  111. data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +32 -45
  112. data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +36 -12
  113. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +34 -22
  114. data/lib/new_relic/agent/instrumentation/active_storage.rb +3 -3
  115. data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +25 -18
  116. data/lib/new_relic/agent/instrumentation/active_support_logger/chain.rb +23 -0
  117. data/lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb +20 -0
  118. data/lib/new_relic/agent/instrumentation/active_support_logger/prepend.rb +12 -0
  119. data/lib/new_relic/agent/instrumentation/active_support_logger.rb +24 -0
  120. data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +12 -3
  121. data/lib/new_relic/agent/instrumentation/authlogic.rb +11 -3
  122. data/lib/new_relic/agent/instrumentation/bunny/chain.rb +45 -0
  123. data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +150 -0
  124. data/lib/new_relic/agent/instrumentation/bunny/prepend.rb +35 -0
  125. data/lib/new_relic/agent/instrumentation/bunny.rb +14 -138
  126. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +69 -59
  127. data/lib/new_relic/agent/instrumentation/curb/chain.rb +91 -0
  128. data/lib/new_relic/agent/instrumentation/curb/instrumentation.rb +221 -0
  129. data/lib/new_relic/agent/instrumentation/curb/prepend.rb +61 -0
  130. data/lib/new_relic/agent/instrumentation/curb.rb +13 -198
  131. data/lib/new_relic/agent/instrumentation/data_mapper.rb +68 -55
  132. data/lib/new_relic/agent/instrumentation/delayed_job/chain.rb +35 -0
  133. data/lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb +48 -0
  134. data/lib/new_relic/agent/instrumentation/delayed_job/prepend.rb +33 -0
  135. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +30 -52
  136. data/lib/new_relic/agent/instrumentation/elasticsearch/chain.rb +29 -0
  137. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +66 -0
  138. data/lib/new_relic/agent/instrumentation/elasticsearch/prepend.rb +13 -0
  139. data/lib/new_relic/agent/instrumentation/elasticsearch.rb +31 -0
  140. data/lib/new_relic/agent/instrumentation/excon/middleware.rb +7 -6
  141. data/lib/new_relic/agent/instrumentation/excon.rb +24 -26
  142. data/lib/new_relic/agent/instrumentation/grape/chain.rb +24 -0
  143. data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +100 -0
  144. data/lib/new_relic/agent/instrumentation/grape/prepend.rb +17 -0
  145. data/lib/new_relic/agent/instrumentation/grape.rb +12 -118
  146. data/lib/new_relic/agent/instrumentation/grpc/client/chain.rb +97 -0
  147. data/lib/new_relic/agent/instrumentation/grpc/client/instrumentation.rb +89 -0
  148. data/lib/new_relic/agent/instrumentation/grpc/client/prepend.rb +111 -0
  149. data/lib/new_relic/agent/instrumentation/grpc/client/request_wrapper.rb +30 -0
  150. data/lib/new_relic/agent/instrumentation/grpc/helper.rb +32 -0
  151. data/lib/new_relic/agent/instrumentation/grpc/server/chain.rb +69 -0
  152. data/lib/new_relic/agent/instrumentation/grpc/server/instrumentation.rb +134 -0
  153. data/lib/new_relic/agent/instrumentation/grpc/server/rpc_desc_prepend.rb +35 -0
  154. data/lib/new_relic/agent/instrumentation/grpc/server/rpc_server_prepend.rb +26 -0
  155. data/lib/new_relic/agent/instrumentation/grpc_client.rb +23 -0
  156. data/lib/new_relic/agent/instrumentation/grpc_server.rb +25 -0
  157. data/lib/new_relic/agent/instrumentation/httpclient/chain.rb +24 -0
  158. data/lib/new_relic/agent/instrumentation/httpclient/instrumentation.rb +37 -0
  159. data/lib/new_relic/agent/instrumentation/httpclient/prepend.rb +15 -0
  160. data/lib/new_relic/agent/instrumentation/httpclient.rb +12 -32
  161. data/lib/new_relic/agent/instrumentation/httprb/chain.rb +22 -0
  162. data/lib/new_relic/agent/instrumentation/httprb/instrumentation.rb +30 -0
  163. data/lib/new_relic/agent/instrumentation/httprb/prepend.rb +15 -0
  164. data/lib/new_relic/agent/instrumentation/httprb.rb +29 -0
  165. data/lib/new_relic/agent/instrumentation/ignore_actions.rb +5 -6
  166. data/lib/new_relic/agent/instrumentation/logger/chain.rb +21 -0
  167. data/lib/new_relic/agent/instrumentation/logger/instrumentation.rb +66 -0
  168. data/lib/new_relic/agent/instrumentation/logger/prepend.rb +13 -0
  169. data/lib/new_relic/agent/instrumentation/logger.rb +26 -0
  170. data/lib/new_relic/agent/instrumentation/memcache/chain.rb +15 -0
  171. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +58 -125
  172. data/lib/new_relic/agent/instrumentation/memcache/helper.rb +59 -0
  173. data/lib/new_relic/agent/instrumentation/memcache/instrumentation.rb +90 -0
  174. data/lib/new_relic/agent/instrumentation/memcache/prepend.rb +101 -0
  175. data/lib/new_relic/agent/instrumentation/memcache.rb +57 -71
  176. data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +14 -13
  177. data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +10 -10
  178. data/lib/new_relic/agent/instrumentation/mongo.rb +6 -131
  179. data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +49 -13
  180. data/lib/new_relic/agent/instrumentation/net_http/chain.rb +24 -0
  181. data/lib/new_relic/agent/instrumentation/net_http/instrumentation.rb +40 -0
  182. data/lib/new_relic/agent/instrumentation/net_http/prepend.rb +21 -0
  183. data/lib/new_relic/agent/instrumentation/net_http.rb +44 -0
  184. data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +34 -9
  185. data/lib/new_relic/agent/instrumentation/padrino/chain.rb +38 -0
  186. data/lib/new_relic/agent/instrumentation/padrino/instrumentation.rb +28 -0
  187. data/lib/new_relic/agent/instrumentation/padrino/prepend.rb +20 -0
  188. data/lib/new_relic/agent/instrumentation/padrino.rb +22 -58
  189. data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +4 -4
  190. data/lib/new_relic/agent/instrumentation/queue_time.rb +9 -10
  191. data/lib/new_relic/agent/instrumentation/rack/chain.rb +66 -0
  192. data/lib/new_relic/agent/instrumentation/rack/helpers.rb +33 -0
  193. data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +75 -0
  194. data/lib/new_relic/agent/instrumentation/rack/prepend.rb +43 -0
  195. data/lib/new_relic/agent/instrumentation/rack.rb +31 -139
  196. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +17 -53
  197. data/lib/new_relic/agent/instrumentation/rails_middleware.rb +2 -2
  198. data/lib/new_relic/agent/instrumentation/rails_notifications/action_cable.rb +6 -5
  199. data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +4 -4
  200. data/lib/new_relic/agent/instrumentation/rails_notifications/action_view.rb +4 -3
  201. data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +14 -4
  202. data/lib/new_relic/agent/instrumentation/rake/chain.rb +20 -0
  203. data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +149 -0
  204. data/lib/new_relic/agent/instrumentation/rake/prepend.rb +14 -0
  205. data/lib/new_relic/agent/instrumentation/rake.rb +17 -157
  206. data/lib/new_relic/agent/instrumentation/redis/chain.rb +45 -0
  207. data/lib/new_relic/agent/instrumentation/redis/constants.rb +17 -0
  208. data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +72 -0
  209. data/lib/new_relic/agent/instrumentation/redis/middleware.rb +16 -0
  210. data/lib/new_relic/agent/instrumentation/redis/prepend.rb +29 -0
  211. data/lib/new_relic/agent/instrumentation/redis.rb +19 -102
  212. data/lib/new_relic/agent/instrumentation/resque/chain.rb +21 -0
  213. data/lib/new_relic/agent/instrumentation/resque/helper.rb +19 -0
  214. data/lib/new_relic/agent/instrumentation/resque/instrumentation.rb +34 -0
  215. data/lib/new_relic/agent/instrumentation/resque/prepend.rb +15 -0
  216. data/lib/new_relic/agent/instrumentation/resque.rb +29 -37
  217. data/lib/new_relic/agent/instrumentation/sequel.rb +15 -17
  218. data/lib/new_relic/agent/instrumentation/sequel_helper.rb +3 -3
  219. data/lib/new_relic/agent/instrumentation/sidekiq/client.rb +20 -0
  220. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +30 -0
  221. data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +37 -0
  222. data/lib/new_relic/agent/instrumentation/sidekiq.rb +28 -45
  223. data/lib/new_relic/agent/instrumentation/sinatra/chain.rb +55 -0
  224. data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +31 -37
  225. data/lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb +125 -0
  226. data/lib/new_relic/agent/instrumentation/sinatra/prepend.rb +33 -0
  227. data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +3 -3
  228. data/lib/new_relic/agent/instrumentation/sinatra.rb +35 -165
  229. data/lib/new_relic/agent/instrumentation/sunspot.rb +12 -4
  230. data/lib/new_relic/agent/instrumentation/thread/chain.rb +24 -0
  231. data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +28 -0
  232. data/lib/new_relic/agent/instrumentation/thread/prepend.rb +22 -0
  233. data/lib/new_relic/agent/instrumentation/thread.rb +20 -0
  234. data/lib/new_relic/agent/instrumentation/tilt/chain.rb +24 -0
  235. data/lib/new_relic/agent/instrumentation/tilt/instrumentation.rb +41 -0
  236. data/lib/new_relic/agent/instrumentation/tilt/prepend.rb +13 -0
  237. data/lib/new_relic/agent/instrumentation/tilt.rb +25 -0
  238. data/lib/new_relic/agent/instrumentation/typhoeus/chain.rb +22 -0
  239. data/lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb +80 -0
  240. data/lib/new_relic/agent/instrumentation/typhoeus/prepend.rb +14 -0
  241. data/lib/new_relic/agent/instrumentation/typhoeus.rb +14 -76
  242. data/lib/new_relic/agent/instrumentation.rb +2 -2
  243. data/lib/new_relic/agent/internal_agent_error.rb +3 -3
  244. data/lib/new_relic/agent/javascript_instrumentor.rb +48 -42
  245. data/lib/new_relic/agent/linking_metadata.rb +44 -0
  246. data/lib/new_relic/agent/local_log_decorator.rb +37 -0
  247. data/lib/new_relic/agent/log_event_aggregator.rb +235 -0
  248. data/lib/new_relic/agent/log_once.rb +2 -2
  249. data/lib/new_relic/agent/log_priority.rb +20 -0
  250. data/lib/new_relic/agent/logging.rb +39 -26
  251. data/lib/new_relic/agent/memory_logger.rb +3 -3
  252. data/lib/new_relic/agent/messaging.rb +70 -154
  253. data/lib/new_relic/agent/method_tracer.rb +152 -145
  254. data/lib/new_relic/agent/method_tracer_helpers.rb +87 -5
  255. data/lib/new_relic/agent/monitors/cross_app_monitor.rb +118 -0
  256. data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +28 -0
  257. data/lib/new_relic/agent/{inbound_request_monitor.rb → monitors/inbound_request_monitor.rb} +3 -4
  258. data/lib/new_relic/agent/{synthetics_monitor.rb → monitors/synthetics_monitor.rb} +8 -13
  259. data/lib/new_relic/agent/monitors.rb +26 -0
  260. data/lib/new_relic/agent/new_relic_service/encoders.rb +7 -7
  261. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +6 -6
  262. data/lib/new_relic/agent/new_relic_service/marshaller.rb +3 -3
  263. data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +6 -5
  264. data/lib/new_relic/agent/new_relic_service.rb +258 -184
  265. data/lib/new_relic/agent/noticeable_error.rb +19 -0
  266. data/lib/new_relic/agent/null_logger.rb +8 -4
  267. data/lib/new_relic/agent/obfuscator.rb +9 -11
  268. data/lib/new_relic/agent/parameter_filtering.rb +25 -11
  269. data/lib/new_relic/agent/payload_metric_mapping.rb +10 -11
  270. data/lib/new_relic/agent/pipe_channel_manager.rb +28 -18
  271. data/lib/new_relic/agent/pipe_service.rb +9 -6
  272. data/lib/new_relic/agent/prepend_supportability.rb +3 -3
  273. data/lib/new_relic/agent/priority_sampled_buffer.rb +15 -15
  274. data/lib/new_relic/agent/range_extensions.rb +9 -29
  275. data/lib/new_relic/agent/rules_engine/replacement_rule.rb +12 -12
  276. data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +14 -14
  277. data/lib/new_relic/agent/rules_engine.rb +6 -5
  278. data/lib/new_relic/agent/sampler.rb +4 -5
  279. data/lib/new_relic/agent/sampler_collection.rb +4 -5
  280. data/lib/new_relic/agent/samplers/cpu_sampler.rb +4 -3
  281. data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +13 -10
  282. data/lib/new_relic/agent/samplers/memory_sampler.rb +26 -15
  283. data/lib/new_relic/agent/samplers/object_sampler.rb +2 -2
  284. data/lib/new_relic/agent/samplers/vm_sampler.rb +22 -20
  285. data/lib/new_relic/agent/span_event_aggregator.rb +13 -13
  286. data/lib/new_relic/agent/span_event_primitive.rb +106 -68
  287. data/lib/new_relic/agent/sql_sampler.rb +22 -22
  288. data/lib/new_relic/agent/stats.rb +79 -42
  289. data/lib/new_relic/agent/stats_engine/gc_profiler.rb +11 -13
  290. data/lib/new_relic/agent/stats_engine/stats_hash.rb +13 -14
  291. data/lib/new_relic/agent/stats_engine.rb +9 -9
  292. data/lib/new_relic/agent/synthetics_event_aggregator.rb +8 -9
  293. data/lib/new_relic/agent/system_info.rb +95 -66
  294. data/lib/new_relic/agent/threading/agent_thread.rb +19 -15
  295. data/lib/new_relic/agent/threading/backtrace_node.rb +13 -14
  296. data/lib/new_relic/agent/threading/backtrace_service.rb +15 -15
  297. data/lib/new_relic/agent/threading/thread_profile.rb +24 -24
  298. data/lib/new_relic/agent/timestamp_sampled_buffer.rb +2 -2
  299. data/lib/new_relic/agent/tracer.rb +107 -101
  300. data/lib/new_relic/agent/transaction/abstract_segment.rb +128 -38
  301. data/lib/new_relic/agent/transaction/datastore_segment.rb +22 -18
  302. data/lib/new_relic/agent/transaction/distributed_tracer.rb +184 -0
  303. data/lib/new_relic/agent/transaction/distributed_tracing.rb +75 -84
  304. data/lib/new_relic/agent/transaction/external_request_segment.rb +66 -76
  305. data/lib/new_relic/agent/transaction/message_broker_segment.rb +34 -46
  306. data/lib/new_relic/agent/transaction/request_attributes.rb +36 -36
  307. data/lib/new_relic/agent/transaction/segment.rb +35 -11
  308. data/lib/new_relic/agent/transaction/slowest_sample_buffer.rb +2 -4
  309. data/lib/new_relic/agent/transaction/synthetics_sample_buffer.rb +2 -2
  310. data/lib/new_relic/agent/transaction/trace.rb +18 -16
  311. data/lib/new_relic/agent/transaction/trace_builder.rb +11 -11
  312. data/lib/new_relic/agent/transaction/trace_context.rb +102 -93
  313. data/lib/new_relic/agent/transaction/trace_node.rb +26 -28
  314. data/lib/new_relic/agent/transaction/tracing.rb +15 -12
  315. data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +5 -5
  316. data/lib/new_relic/agent/transaction.rb +210 -177
  317. data/lib/new_relic/agent/transaction_error_primitive.rb +32 -28
  318. data/lib/new_relic/agent/transaction_event_aggregator.rb +13 -13
  319. data/lib/new_relic/agent/transaction_event_primitive.rb +43 -47
  320. data/lib/new_relic/agent/transaction_event_recorder.rb +17 -16
  321. data/lib/new_relic/agent/transaction_metrics.rb +11 -10
  322. data/lib/new_relic/agent/transaction_sampler.rb +6 -7
  323. data/lib/new_relic/agent/transaction_time_aggregator.rb +27 -26
  324. data/lib/new_relic/agent/utilization/aws.rb +34 -4
  325. data/lib/new_relic/agent/utilization/azure.rb +4 -4
  326. data/lib/new_relic/agent/utilization/gcp.rb +8 -8
  327. data/lib/new_relic/agent/utilization/pcf.rb +6 -5
  328. data/lib/new_relic/agent/utilization/vendor.rb +44 -29
  329. data/lib/new_relic/agent/utilization_data.rb +8 -6
  330. data/lib/new_relic/agent/vm/jruby_vm.rb +2 -2
  331. data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +3 -3
  332. data/lib/new_relic/agent/vm/mri_vm.rb +46 -19
  333. data/lib/new_relic/agent/vm/snapshot.rb +6 -6
  334. data/lib/new_relic/agent/vm.rb +2 -2
  335. data/lib/new_relic/agent/worker_loop.rb +11 -13
  336. data/lib/new_relic/agent.rb +78 -79
  337. data/lib/new_relic/cli/command.rb +21 -23
  338. data/lib/new_relic/cli/commands/deployments.rb +93 -44
  339. data/lib/new_relic/cli/commands/install.rb +15 -17
  340. data/lib/new_relic/coerce.rb +19 -15
  341. data/lib/new_relic/collection_helper.rb +51 -49
  342. data/lib/new_relic/constants.rb +39 -0
  343. data/lib/new_relic/control/class_methods.rb +4 -4
  344. data/lib/new_relic/control/frameworks/external.rb +3 -3
  345. data/lib/new_relic/control/frameworks/rails.rb +24 -18
  346. data/lib/new_relic/control/frameworks/rails3.rb +4 -5
  347. data/lib/new_relic/control/frameworks/rails4.rb +2 -2
  348. data/lib/new_relic/control/frameworks/rails_notifications.rb +2 -2
  349. data/lib/new_relic/control/frameworks/ruby.rb +4 -4
  350. data/lib/new_relic/control/frameworks/sinatra.rb +8 -2
  351. data/lib/new_relic/control/frameworks.rb +2 -2
  352. data/lib/new_relic/control/instance_methods.rb +24 -46
  353. data/lib/new_relic/control/instrumentation.rb +40 -12
  354. data/lib/new_relic/control/private_instance_methods.rb +48 -0
  355. data/lib/new_relic/control/server_methods.rb +4 -5
  356. data/lib/new_relic/control.rb +2 -3
  357. data/lib/new_relic/delayed_job_injection.rb +2 -2
  358. data/lib/new_relic/dependency_detection.rb +129 -18
  359. data/lib/new_relic/environment_report.rb +41 -35
  360. data/lib/new_relic/helper.rb +49 -8
  361. data/lib/new_relic/language_support.rb +30 -6
  362. data/lib/new_relic/latest_changes.rb +9 -8
  363. data/lib/new_relic/local_environment.rb +25 -19
  364. data/lib/new_relic/metric_data.rb +32 -27
  365. data/lib/new_relic/metric_spec.rb +9 -7
  366. data/lib/new_relic/noticed_error.rb +44 -35
  367. data/lib/new_relic/rack/agent_hooks.rb +2 -2
  368. data/lib/new_relic/rack/agent_middleware.rb +6 -4
  369. data/lib/new_relic/rack/browser_monitoring.rb +134 -119
  370. data/lib/new_relic/rack.rb +2 -2
  371. data/lib/new_relic/recipes/capistrano3.rb +4 -62
  372. data/lib/new_relic/recipes/capistrano_legacy.rb +24 -27
  373. data/lib/new_relic/recipes/helpers/send_deployment.rb +69 -0
  374. data/lib/new_relic/recipes.rb +2 -2
  375. data/lib/new_relic/supportability_helper.rb +21 -6
  376. data/lib/new_relic/traced_thread.rb +35 -0
  377. data/lib/new_relic/version.rb +7 -18
  378. data/lib/newrelic_rpm.rb +12 -36
  379. data/lib/sequel/extensions/newrelic_instrumentation.rb +13 -16
  380. data/lib/sequel/plugins/newrelic_instrumentation.rb +5 -11
  381. data/lib/tasks/all.rb +4 -4
  382. data/lib/tasks/config.rake +22 -117
  383. data/lib/tasks/coverage_report.rake +28 -0
  384. data/lib/tasks/helpers/config.html.erb +21 -0
  385. data/lib/tasks/{config.text.erb → helpers/config.text.erb} +0 -0
  386. data/lib/tasks/helpers/format.rb +123 -0
  387. data/lib/tasks/helpers/matches.rb +12 -0
  388. data/lib/tasks/helpers/prompt.rb +24 -0
  389. data/lib/tasks/helpers/removers.rb +33 -0
  390. data/lib/tasks/install.rake +4 -0
  391. data/lib/tasks/instrumentation_generator/README.md +63 -0
  392. data/lib/tasks/instrumentation_generator/TODO.md +33 -0
  393. data/lib/tasks/instrumentation_generator/instrumentation.thor +124 -0
  394. data/lib/tasks/instrumentation_generator/templates/Envfile.tt +9 -0
  395. data/lib/tasks/instrumentation_generator/templates/chain.tt +22 -0
  396. data/lib/tasks/instrumentation_generator/templates/chain_method.tt +8 -0
  397. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +29 -0
  398. data/lib/tasks/instrumentation_generator/templates/instrumentation.tt +13 -0
  399. data/lib/tasks/instrumentation_generator/templates/instrumentation_method.tt +3 -0
  400. data/lib/tasks/instrumentation_generator/templates/newrelic.yml.tt +19 -0
  401. data/lib/tasks/instrumentation_generator/templates/prepend.tt +13 -0
  402. data/lib/tasks/instrumentation_generator/templates/prepend_method.tt +3 -0
  403. data/lib/tasks/instrumentation_generator/templates/test.tt +15 -0
  404. data/lib/tasks/multiverse.rake +4 -0
  405. data/lib/tasks/multiverse.rb +12 -5
  406. data/lib/tasks/newrelic.rb +2 -2
  407. data/lib/tasks/tests.rake +14 -14
  408. data/newrelic.yml +648 -3
  409. data/newrelic_rpm.gemspec +28 -25
  410. data/recipes/newrelic.rb +3 -3
  411. data/test/agent_helper.rb +332 -103
  412. metadata +192 -119
  413. data/.travis.yml +0 -210
  414. data/bin/mongrel_rpm +0 -33
  415. data/cert/cacert.pem +0 -1177
  416. data/lib/new_relic/agent/cross_app_monitor.rb +0 -110
  417. data/lib/new_relic/agent/datastores/mongo/obfuscator.rb +0 -44
  418. data/lib/new_relic/agent/datastores/mongo/statement_formatter.rb +0 -53
  419. data/lib/new_relic/agent/distributed_trace_intrinsics.rb +0 -90
  420. data/lib/new_relic/agent/distributed_trace_metrics.rb +0 -74
  421. data/lib/new_relic/agent/distributed_trace_monitor.rb +0 -30
  422. data/lib/new_relic/agent/distributed_trace_payload.rb +0 -175
  423. data/lib/new_relic/agent/distributed_trace_transport_type.rb +0 -43
  424. data/lib/new_relic/agent/http_clients/abstract_request.rb +0 -31
  425. data/lib/new_relic/agent/instrumentation/excon/connection.rb +0 -46
  426. data/lib/new_relic/agent/instrumentation/http.rb +0 -46
  427. data/lib/new_relic/agent/instrumentation/merb/controller.rb +0 -44
  428. data/lib/new_relic/agent/instrumentation/merb/errors.rb +0 -33
  429. data/lib/new_relic/agent/instrumentation/net.rb +0 -50
  430. data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +0 -125
  431. data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +0 -46
  432. data/lib/new_relic/agent/supported_versions.rb +0 -275
  433. data/lib/new_relic/agent/trace_context.rb +0 -244
  434. data/lib/new_relic/agent/trace_context_payload.rb +0 -134
  435. data/lib/new_relic/agent/trace_context_request_monitor.rb +0 -42
  436. data/lib/new_relic/build.rb +0 -2
  437. data/lib/new_relic/control/frameworks/merb.rb +0 -29
  438. data/lib/new_relic/metrics.rb +0 -13
  439. data/lib/tasks/config.html.erb +0 -32
  440. data/true +0 -0
data/.rubocop.yml ADDED
@@ -0,0 +1,1817 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require:
4
+ # Default minitest configurations: https://github.com/rubocop/rubocop-minitest/blob/master/config/default.yml
5
+ - rubocop-minitest
6
+ # Default performance configurations: https://github.com/rubocop/rubocop-performance/blob/master/config/default.yml
7
+ - rubocop-performance
8
+ # Default rake configurations: https://github.com/rubocop/rubocop-rake/blob/master/config/default.yml
9
+ <%= '- rubocop-rake' if RUBY_VERSION >= '2.4.0' %>
10
+
11
+ AllCops:
12
+ TargetRubyVersion: 2.7
13
+ # Rubocop shouldn't run on auto generated files.
14
+ Exclude:
15
+ - 'test/multiverse/suites/active_record/db/schema.rb'
16
+ - 'test/multiverse/suites/active_record_pg/db/schema.rb'
17
+ NewCops: enable
18
+
19
+ Bundler/DuplicatedGem:
20
+ Enabled: true
21
+ Include:
22
+ - '**/*.gemfile'
23
+ - '**/Gemfile'
24
+ - '**/gems.rb'
25
+ - '**/*.gemspec'
26
+
27
+ Bundler/GemComment:
28
+ Enabled: false
29
+
30
+ Bundler/GemFilename:
31
+ Enabled: false
32
+
33
+ Bundler/GemVersion:
34
+ Enabled: false
35
+
36
+ Bundler/InsecureProtocolSource:
37
+ Enabled: true
38
+ Include:
39
+ - '**/*.gemfile'
40
+ - '**/Gemfile'
41
+ - '**/gems.rb'
42
+
43
+ Bundler/OrderedGems:
44
+ Enabled: false
45
+
46
+ Gemspec/DeprecatedAttributeAssignment:
47
+ Enabled: true
48
+
49
+ Gemspec/DuplicatedAssignment:
50
+ Enabled: true
51
+ Include:
52
+ - '**/*.gemspec'
53
+
54
+ Gemspec/OrderedDependencies:
55
+ Enabled: false
56
+
57
+ Gemspec/RequireMFA:
58
+ Enabled: false
59
+
60
+ Gemspec/RequiredRubyVersion:
61
+ Enabled: false
62
+
63
+ Gemspec/RubyVersionGlobalsUsage:
64
+ Enabled: false
65
+
66
+ Layout/AccessModifierIndentation:
67
+ Enabled: true
68
+ EnforcedStyle: indent
69
+ IndentationWidth: ~
70
+
71
+ Layout/ArgumentAlignment:
72
+ Enabled: true
73
+ EnforcedStyle: with_fixed_indentation
74
+
75
+ Layout/ArrayAlignment:
76
+ Enabled: true
77
+ EnforcedStyle: with_fixed_indentation
78
+
79
+ Layout/AssignmentIndentation:
80
+ Enabled: true
81
+ IndentationWidth: ~
82
+
83
+ Layout/BeginEndAlignment:
84
+ Enabled: true
85
+ EnforcedStyleAlignWith: start_of_line
86
+ AutoCorrect: true
87
+ Severity: warning
88
+
89
+ Layout/BlockAlignment:
90
+ Enabled: true
91
+ EnforcedStyleAlignWith: either
92
+
93
+ Layout/BlockEndNewline:
94
+ Enabled: true
95
+
96
+ Layout/CaseIndentation:
97
+ # Disabled because IndentOneStep can't be configured for one-liner cases. See:
98
+ # https://github.com/rubocop-hq/rubocop/issues/6447
99
+ Enabled: false
100
+
101
+ Layout/ClassStructure:
102
+ Enabled: false
103
+
104
+ Layout/ClosingHeredocIndentation:
105
+ Enabled: true
106
+
107
+ Layout/ClosingParenthesisIndentation:
108
+ Enabled: true
109
+
110
+ Layout/CommentIndentation:
111
+ Enabled: true
112
+
113
+ # Disabling for now
114
+ Layout/ConditionPosition:
115
+ Enabled: false
116
+
117
+ Layout/DefEndAlignment:
118
+ Enabled: true
119
+ EnforcedStyleAlignWith: start_of_line
120
+ AutoCorrect: true
121
+ Severity: warning
122
+
123
+ Layout/DotPosition:
124
+ Enabled: true
125
+ EnforcedStyle: leading
126
+
127
+ Layout/ElseAlignment:
128
+ Enabled: true
129
+
130
+ Layout/EmptyComment:
131
+ Enabled: true
132
+ AllowBorderComment: true
133
+ AllowMarginComment: true
134
+
135
+ # Disabling for now
136
+ Layout/EmptyLineAfterMagicComment:
137
+ Enabled: false
138
+
139
+ Layout/EmptyLineAfterMultilineCondition:
140
+ Enabled: false
141
+
142
+ # Disabling for now
143
+ Layout/EmptyLineBetweenDefs:
144
+ Enabled: false
145
+ # AllowAdjacentOneLineDefs: false
146
+ # NumberOfEmptyLines: 1
147
+
148
+ Layout/EmptyLines:
149
+ Enabled: true
150
+
151
+ Layout/EmptyLinesAroundAccessModifier:
152
+ Enabled: true
153
+
154
+ Layout/EmptyLinesAroundArguments:
155
+ Enabled: true
156
+
157
+ Layout/EmptyLinesAroundAttributeAccessor:
158
+ Enabled: false
159
+
160
+ Layout/EmptyLinesAroundBeginBody:
161
+ Enabled: true
162
+
163
+ Layout/EmptyLinesAroundBlockBody:
164
+ Enabled: true
165
+ EnforcedStyle: no_empty_lines
166
+
167
+ Layout/EmptyLinesAroundClassBody:
168
+ Enabled: true
169
+ EnforcedStyle: no_empty_lines
170
+
171
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
172
+ Enabled: true
173
+
174
+ Layout/EmptyLinesAroundMethodBody:
175
+ Enabled: true
176
+
177
+ Layout/EmptyLinesAroundModuleBody:
178
+ Enabled: true
179
+ EnforcedStyle: no_empty_lines
180
+
181
+ Layout/EndAlignment:
182
+ Enabled: true
183
+ AutoCorrect: true
184
+ EnforcedStyleAlignWith: variable
185
+ Severity: warning
186
+
187
+ Layout/EndOfLine:
188
+ Enabled: true
189
+ EnforcedStyle: native
190
+
191
+ Layout/ExtraSpacing:
192
+ Enabled: true
193
+ AllowForAlignment: false
194
+ AllowBeforeTrailingComments: false
195
+ ForceEqualSignAlignment: false
196
+
197
+ Layout/FirstArgumentIndentation:
198
+ Enabled: true
199
+ EnforcedStyle: consistent
200
+ IndentationWidth: ~
201
+
202
+ Layout/FirstArrayElementIndentation:
203
+ Enabled: true
204
+ EnforcedStyle: consistent
205
+ IndentationWidth: ~
206
+
207
+ Layout/FirstArrayElementLineBreak:
208
+ Enabled: false
209
+
210
+ Layout/FirstHashElementIndentation:
211
+ Enabled: true
212
+ EnforcedStyle: consistent
213
+ IndentationWidth: ~
214
+
215
+ Layout/FirstHashElementLineBreak:
216
+ Enabled: false
217
+
218
+ Layout/FirstMethodArgumentLineBreak:
219
+ Enabled: false
220
+
221
+ Layout/FirstMethodParameterLineBreak:
222
+ Enabled: false
223
+
224
+ Layout/FirstParameterIndentation:
225
+ Enabled: false
226
+
227
+ Layout/HashAlignment:
228
+ Enabled: true
229
+ EnforcedHashRocketStyle: key
230
+ EnforcedColonStyle: key
231
+ EnforcedLastArgumentHashStyle: always_inspect
232
+
233
+ Layout/HeredocArgumentClosingParenthesis:
234
+ Enabled: false
235
+
236
+ # Disabling for now
237
+ Layout/HeredocIndentation:
238
+ Enabled: false
239
+
240
+ Layout/IndentationConsistency:
241
+ Enabled: true
242
+ EnforcedStyle: normal
243
+
244
+ Layout/IndentationStyle:
245
+ Enabled: true
246
+ IndentationWidth: ~
247
+
248
+ Layout/IndentationWidth:
249
+ Enabled: true
250
+ Width: 2
251
+ AllowedPatterns: []
252
+
253
+ Layout/InitialIndentation:
254
+ Enabled: true
255
+
256
+ Layout/LeadingCommentSpace:
257
+ Enabled: true
258
+
259
+ Layout/LeadingEmptyLines:
260
+ Enabled: true
261
+
262
+ Layout/LineEndStringConcatenationIndentation:
263
+ Enabled: false
264
+
265
+ Layout/LineLength:
266
+ # TODO: get this down to something closer to the 80 col ideal
267
+ # we should be able to manage 120
268
+ Max: 576
269
+
270
+ Layout/MultilineArrayBraceLayout:
271
+ Enabled: true
272
+ EnforcedStyle: symmetrical
273
+
274
+ Layout/MultilineArrayLineBreaks:
275
+ Enabled: false
276
+
277
+ Layout/MultilineAssignmentLayout:
278
+ Enabled: false
279
+
280
+ Layout/MultilineBlockLayout:
281
+ Enabled: true
282
+
283
+ Layout/MultilineHashBraceLayout:
284
+ Enabled: true
285
+ EnforcedStyle: symmetrical
286
+
287
+ Layout/MultilineHashKeyLineBreaks:
288
+ Enabled: false
289
+
290
+ Layout/MultilineMethodArgumentLineBreaks:
291
+ Enabled: false
292
+
293
+ Layout/MultilineMethodCallBraceLayout:
294
+ Enabled: true
295
+ EnforcedStyle: symmetrical
296
+
297
+ Layout/MultilineMethodCallIndentation:
298
+ Enabled: true
299
+ EnforcedStyle: indented
300
+ IndentationWidth: ~
301
+
302
+ Layout/MultilineMethodDefinitionBraceLayout:
303
+ Enabled: true
304
+ EnforcedStyle: symmetrical
305
+
306
+ Layout/MultilineOperationIndentation:
307
+ Enabled: true
308
+ EnforcedStyle: indented
309
+ IndentationWidth: ~
310
+
311
+ Layout/ParameterAlignment:
312
+ Enabled: true
313
+ EnforcedStyle: with_fixed_indentation
314
+ IndentationWidth: ~
315
+
316
+ Layout/RedundantLineBreak:
317
+ Enabled: false
318
+
319
+ Layout/RescueEnsureAlignment:
320
+ Enabled: true
321
+
322
+ Layout/SingleLineBlockChain:
323
+ Enabled: false
324
+
325
+ Layout/SpaceAfterColon:
326
+ Enabled: true
327
+
328
+ Layout/SpaceAfterComma:
329
+ Enabled: true
330
+
331
+ Layout/SpaceAfterMethodName:
332
+ Enabled: true
333
+
334
+ Layout/SpaceAfterNot:
335
+ Enabled: true
336
+
337
+ Layout/SpaceAfterSemicolon:
338
+ Enabled: true
339
+
340
+ Layout/SpaceAroundBlockParameters:
341
+ Enabled: true
342
+ EnforcedStyleInsidePipes: no_space
343
+
344
+ Layout/SpaceAroundEqualsInParameterDefault:
345
+ Enabled: true
346
+ EnforcedStyle: space
347
+
348
+ Layout/SpaceAroundKeyword:
349
+ Enabled: true
350
+
351
+ Layout/SpaceAroundMethodCallOperator:
352
+ Enabled: true
353
+
354
+ Layout/SpaceAroundOperators:
355
+ Enabled: true
356
+ AllowForAlignment: true
357
+
358
+ Layout/SpaceBeforeBlockBraces:
359
+ Enabled: true
360
+ EnforcedStyle: space
361
+ EnforcedStyleForEmptyBraces: space
362
+
363
+ Layout/SpaceBeforeBrackets:
364
+ Enabled: false
365
+
366
+ Layout/SpaceBeforeComma:
367
+ Enabled: true
368
+
369
+ Layout/SpaceBeforeComment:
370
+ Enabled: true
371
+
372
+ Layout/SpaceBeforeFirstArg:
373
+ Enabled: true
374
+ AllowForAlignment: true
375
+
376
+ Layout/SpaceBeforeSemicolon:
377
+ Enabled: true
378
+
379
+ # Disabling for now
380
+ Layout/SpaceInLambdaLiteral:
381
+ Enabled: false
382
+ # EnforcedStyle: require_no_space
383
+
384
+ Layout/SpaceInsideArrayLiteralBrackets:
385
+ Enabled: true
386
+ EnforcedStyle: no_space
387
+ EnforcedStyleForEmptyBrackets: no_space
388
+
389
+ Layout/SpaceInsideArrayPercentLiteral:
390
+ Enabled: true
391
+
392
+ Layout/SpaceInsideBlockBraces:
393
+ Enabled: true
394
+ EnforcedStyle: space
395
+ EnforcedStyleForEmptyBraces: no_space
396
+ SpaceBeforeBlockParameters: true
397
+
398
+ Layout/SpaceInsideHashLiteralBraces:
399
+ Enabled: true
400
+ EnforcedStyle: no_space
401
+ EnforcedStyleForEmptyBraces: no_space
402
+
403
+ Layout/SpaceInsideParens:
404
+ Enabled: true
405
+ EnforcedStyle: no_space
406
+
407
+ # Disabling for now
408
+ Layout/SpaceInsidePercentLiteralDelimiters:
409
+ Enabled: false
410
+
411
+ Layout/SpaceInsideRangeLiteral:
412
+ Enabled: true
413
+
414
+ Layout/SpaceInsideReferenceBrackets:
415
+ Enabled: true
416
+ EnforcedStyle: no_space
417
+ EnforcedStyleForEmptyBrackets: no_space
418
+
419
+ Layout/SpaceInsideStringInterpolation:
420
+ Enabled: true
421
+ EnforcedStyle: no_space
422
+
423
+ Layout/TrailingEmptyLines:
424
+ Enabled: true
425
+ EnforcedStyle: final_newline
426
+
427
+ Layout/TrailingWhitespace:
428
+ Enabled: true
429
+ AllowInHeredoc: true
430
+
431
+ Lint/AmbiguousAssignment:
432
+ Enabled: true
433
+
434
+ Lint/AmbiguousBlockAssociation:
435
+ Enabled: false
436
+
437
+ # Disabling for now
438
+ Lint/AmbiguousOperator:
439
+ Enabled: false
440
+
441
+ Lint/AmbiguousOperatorPrecedence:
442
+ Enabled: false
443
+
444
+ Lint/AmbiguousRange:
445
+ Enabled: false
446
+
447
+ # Disabling for now
448
+ Lint/AmbiguousRegexpLiteral:
449
+ Enabled: false
450
+
451
+ # Disabling for now
452
+ Lint/AssignmentInCondition:
453
+ Enabled: false
454
+ # AllowSafeAssignment: true
455
+
456
+ Lint/BigDecimalNew:
457
+ Enabled: true
458
+
459
+ # Disabling for now
460
+ Lint/BinaryOperatorWithIdenticalOperands:
461
+ Enabled: false
462
+
463
+ # Disabling for now
464
+ Lint/BooleanSymbol:
465
+ Enabled: false
466
+
467
+ Lint/CircularArgumentReference:
468
+ Enabled: true
469
+
470
+ # Disabling for now
471
+ Lint/ConstantDefinitionInBlock:
472
+ Enabled: false
473
+
474
+ Lint/ConstantResolution:
475
+ Enabled: false
476
+
477
+ Lint/Debugger:
478
+ Enabled: true
479
+
480
+ # Disabling for now
481
+ Lint/DeprecatedClassMethods:
482
+ Enabled: false
483
+
484
+ Lint/DeprecatedConstants:
485
+ Enabled: true
486
+
487
+ Lint/DeprecatedOpenSSLConstant:
488
+ Enabled: true
489
+
490
+ Lint/DisjunctiveAssignmentInConstructor:
491
+ Enabled: false
492
+
493
+ Lint/DuplicateBranch:
494
+ Enabled: false
495
+
496
+ # Disabling for now
497
+ Lint/DuplicateCaseCondition:
498
+ Enabled: false
499
+
500
+ Lint/DuplicateElsifCondition:
501
+ Enabled: true
502
+
503
+ Lint/DuplicateHashKey:
504
+ Enabled: true
505
+
506
+ # Disabling for now
507
+ Lint/DuplicateMethods:
508
+ Enabled: false
509
+
510
+ Lint/DuplicateRegexpCharacterClassElement:
511
+ Enabled: true
512
+
513
+ Lint/DuplicateRequire:
514
+ Enabled: true
515
+
516
+ Lint/DuplicateRescueException:
517
+ Enabled: true
518
+
519
+ Lint/EachWithObjectArgument:
520
+ Enabled: true
521
+
522
+ Lint/ElseLayout:
523
+ Enabled: true
524
+
525
+ Lint/EmptyBlock:
526
+ Enabled: false
527
+
528
+ Lint/EmptyClass:
529
+ Enabled: false
530
+
531
+ Lint/EmptyConditionalBody:
532
+ Enabled: false
533
+
534
+ # Disabling for now
535
+ Lint/EmptyEnsure:
536
+ Enabled: false
537
+ # AutoCorrect: true
538
+
539
+ Lint/EmptyExpression:
540
+ Enabled: true
541
+
542
+ Lint/EmptyFile:
543
+ Enabled: false
544
+
545
+ Lint/EmptyInPattern:
546
+ Enabled: false
547
+
548
+ Lint/EmptyInterpolation:
549
+ Enabled: true
550
+
551
+ Lint/EmptyWhen:
552
+ Enabled: true
553
+ AllowComments: true
554
+
555
+ # Disabling for now
556
+ Lint/EnsureReturn:
557
+ Enabled: false
558
+
559
+ Lint/ErbNewArguments:
560
+ Enabled: true
561
+
562
+ Lint/FlipFlop:
563
+ Enabled: true
564
+
565
+ # Disabling for now
566
+ Lint/FloatComparison:
567
+ Enabled: false
568
+
569
+ Lint/FloatOutOfRange:
570
+ Enabled: true
571
+
572
+ Lint/FormatParameterMismatch:
573
+ Enabled: true
574
+
575
+ Lint/HashCompareByIdentity:
576
+ Enabled: false
577
+
578
+ Lint/HeredocMethodCallPosition:
579
+ Enabled: false
580
+
581
+ Lint/IdentityComparison:
582
+ Enabled: true
583
+
584
+ Lint/ImplicitStringConcatenation:
585
+ Enabled: true
586
+
587
+ # Disabling for now
588
+ Lint/IneffectiveAccessModifier:
589
+ Enabled: false
590
+
591
+ # Disabling for now
592
+ Lint/InheritException:
593
+ Enabled: false
594
+ # EnforcedStyle: runtime_error
595
+
596
+ # Disabling for now
597
+ Lint/InterpolationCheck:
598
+ Enabled: false
599
+
600
+ Lint/LambdaWithoutLiteralBlock:
601
+ Enabled: false
602
+
603
+ Lint/LiteralAsCondition:
604
+ Enabled: true
605
+
606
+ Lint/LiteralInInterpolation:
607
+ Enabled: true
608
+
609
+ Lint/Loop:
610
+ Enabled: true
611
+
612
+ Lint/MissingCopEnableDirective:
613
+ Enabled: true
614
+ MaximumRangeSize: .inf
615
+
616
+ Lint/MissingSuper:
617
+ Enabled: false
618
+
619
+ Lint/MixedRegexpCaptureTypes:
620
+ Enabled: true
621
+
622
+ Lint/MultipleComparison:
623
+ Enabled: true
624
+
625
+ # Disabling for now
626
+ Lint/NestedMethodDefinition:
627
+ Enabled: false
628
+
629
+ Lint/NestedPercentLiteral:
630
+ Enabled: true
631
+
632
+ Lint/NextWithoutAccumulator:
633
+ Enabled: true
634
+
635
+ Lint/NoReturnInBeginEndBlocks:
636
+ Enabled: false
637
+
638
+ # Disabling for now
639
+ Lint/NonDeterministicRequireOrder:
640
+ Enabled: false
641
+
642
+ # Disabling for now
643
+ Lint/NonLocalExitFromIterator:
644
+ Enabled: false
645
+
646
+ Lint/NumberConversion:
647
+ Enabled: false
648
+
649
+ Lint/NumberedParameterAssignment:
650
+ Enabled: true
651
+
652
+ Lint/OrAssignmentToConstant:
653
+ Enabled: false
654
+
655
+ Lint/OrderedMagicComments:
656
+ Enabled: true
657
+
658
+ Lint/OutOfRangeRegexpRef:
659
+ Enabled: true
660
+
661
+ # Disabling for now
662
+ Lint/ParenthesesAsGroupedExpression:
663
+ Enabled: false
664
+
665
+ Lint/PercentStringArray:
666
+ Enabled: false
667
+
668
+ Lint/PercentSymbolArray:
669
+ Enabled: true
670
+
671
+ # Disabling for now
672
+ Lint/RaiseException:
673
+ Enabled: false
674
+
675
+ Lint/RandOne:
676
+ Enabled: true
677
+
678
+ Lint/RedundantCopDisableDirective:
679
+ Enabled: true
680
+
681
+ Lint/RedundantCopEnableDirective:
682
+ Enabled: false
683
+
684
+ Lint/RedundantDirGlobSort:
685
+ Enabled: false
686
+
687
+ # Disabling for now
688
+ Lint/RedundantRequireStatement:
689
+ Enabled: false
690
+
691
+ Lint/RedundantSafeNavigation:
692
+ Enabled: false
693
+
694
+ # Disabling for now
695
+ Lint/RedundantSplatExpansion:
696
+ Enabled: false
697
+
698
+ # Disabling for now
699
+ Lint/RedundantStringCoercion:
700
+ Enabled: false
701
+
702
+ Lint/RedundantWithIndex:
703
+ Enabled: true
704
+
705
+ Lint/RedundantWithObject:
706
+ Enabled: true
707
+
708
+ Lint/RegexpAsCondition:
709
+ Enabled: true
710
+
711
+ Lint/RequireParentheses:
712
+ Enabled: true
713
+
714
+ # Disabling for now
715
+ Lint/RescueException:
716
+ Enabled: false
717
+
718
+ Lint/RescueType:
719
+ Enabled: true
720
+
721
+ Lint/ReturnInVoidContext:
722
+ Enabled: true
723
+
724
+ Lint/SafeNavigationChain:
725
+ Enabled: true
726
+ AllowedMethods:
727
+ - present?
728
+ - blank?
729
+ - presence
730
+ - try
731
+ - try!
732
+
733
+ Lint/SafeNavigationConsistency:
734
+ Enabled: true
735
+ AllowedMethods:
736
+ - present?
737
+ - blank?
738
+ - presence
739
+ - try
740
+ - try!
741
+
742
+ Lint/SafeNavigationWithEmpty:
743
+ Enabled: true
744
+
745
+ Lint/ScriptPermission:
746
+ Enabled: false
747
+
748
+ Lint/SelfAssignment:
749
+ Enabled: true
750
+
751
+ Lint/SendWithMixinArgument:
752
+ Enabled: false
753
+
754
+ # Disabling for now
755
+ Lint/ShadowedArgument:
756
+ Enabled: false
757
+ # IgnoreImplicitReferences: false
758
+
759
+ # Disabling for now
760
+ Lint/ShadowedException:
761
+ Enabled: false
762
+
763
+ Lint/ShadowingOuterLocalVariable:
764
+ Enabled: false
765
+
766
+ Lint/StructNewOverride:
767
+ Enabled: false
768
+
769
+ Lint/SuppressedException:
770
+ Enabled: false
771
+
772
+ # Disabling for now
773
+ Lint/SymbolConversion:
774
+ Enabled: false
775
+
776
+ Lint/Syntax:
777
+ Enabled: true
778
+
779
+ Lint/ToEnumArguments:
780
+ Enabled: false
781
+
782
+ Lint/ToJSON:
783
+ Enabled: false
784
+
785
+ Lint/TopLevelReturnWithArgument:
786
+ Enabled: true
787
+
788
+ Lint/TrailingCommaInAttributeDeclaration:
789
+ Enabled: true
790
+
791
+ Lint/TripleQuotes:
792
+ Enabled: true
793
+
794
+ # Disabling for now
795
+ Lint/UnderscorePrefixedVariableName:
796
+ Enabled: false
797
+
798
+ Lint/UnexpectedBlockArity:
799
+ Enabled: false
800
+
801
+ # Disabling for now
802
+ Lint/UnifiedInteger:
803
+ Enabled: false
804
+
805
+ Lint/UnmodifiedReduceAccumulator:
806
+ Enabled: false
807
+
808
+ # Disabling for now
809
+ Lint/UnreachableCode:
810
+ Enabled: false
811
+
812
+ Lint/UnreachableLoop:
813
+ Enabled: false
814
+
815
+ Lint/UnusedBlockArgument:
816
+ Enabled: false
817
+
818
+ Lint/UnusedMethodArgument:
819
+ Enabled: false
820
+
821
+ Lint/UriEscapeUnescape:
822
+ Enabled: true
823
+
824
+ Lint/UriRegexp:
825
+ Enabled: true
826
+
827
+ Lint/UselessAccessModifier:
828
+ Enabled: false
829
+
830
+ # Disabling for now
831
+ Lint/UselessAssignment:
832
+ Enabled: false
833
+
834
+ Lint/UselessMethodDefinition:
835
+ Enabled: false
836
+
837
+ Lint/UselessSetterCall:
838
+ Enabled: true
839
+
840
+ # Disabling for now
841
+ Lint/UselessTimes:
842
+ Enabled: false
843
+
844
+ # Disabling for now
845
+ Lint/Void:
846
+ Enabled: false
847
+ # CheckForMethodsWithNoSideEffects: false
848
+
849
+ Lint/IncompatibleIoSelectWithFiberScheduler:
850
+ Enabled: false
851
+
852
+ Lint/RequireRelativeSelfPath:
853
+ Enabled: true
854
+
855
+ Metrics/BlockLength:
856
+ Enabled: false
857
+
858
+ Metrics/BlockNesting:
859
+ Enabled: false
860
+
861
+ Metrics/ClassLength:
862
+ Enabled: false
863
+
864
+ Metrics/CyclomaticComplexity:
865
+ Enabled: false
866
+
867
+ Metrics/MethodLength:
868
+ Enabled: false
869
+
870
+ Metrics/ModuleLength:
871
+ Enabled: false
872
+
873
+ Metrics/ParameterLists:
874
+ Enabled: false
875
+
876
+ Metrics/PerceivedComplexity:
877
+ Enabled: false
878
+
879
+ Migration/DepartmentName:
880
+ Enabled: true
881
+
882
+ Naming/AccessorMethodName:
883
+ Enabled: false
884
+
885
+ Naming/AsciiIdentifiers:
886
+ Enabled: false
887
+
888
+ # Disabling for now
889
+ Naming/BinaryOperatorParameterName:
890
+ Enabled: false
891
+
892
+ Naming/BlockParameterName:
893
+ Enabled: true
894
+ MinNameLength: 1
895
+ AllowNamesEndingInNumbers: true
896
+ AllowedNames: []
897
+ ForbiddenNames: []
898
+
899
+ Naming/ClassAndModuleCamelCase:
900
+ Enabled: true
901
+
902
+ Naming/ConstantName:
903
+ Enabled: true
904
+
905
+ Naming/FileName:
906
+ Enabled: false
907
+
908
+ Naming/HeredocDelimiterCase:
909
+ Enabled: true
910
+ EnforcedStyle: uppercase
911
+
912
+ Naming/HeredocDelimiterNaming:
913
+ Enabled: false
914
+
915
+ Naming/InclusiveLanguage:
916
+ Enabled: false
917
+
918
+ Naming/MemoizedInstanceVariableName:
919
+ Enabled: false
920
+
921
+ Naming/MethodName:
922
+ Enabled: false
923
+
924
+ Naming/MethodParameterName:
925
+ Enabled: false
926
+
927
+ Naming/PredicateName:
928
+ Enabled: false
929
+
930
+ Naming/RescuedExceptionsVariableName:
931
+ Enabled: false
932
+
933
+ Naming/VariableName:
934
+ Enabled: false
935
+ # EnforcedStyle: snake_case
936
+
937
+ Naming/VariableNumber:
938
+ Enabled: false
939
+
940
+ # TODO: OLD RUBIES - Requires 2.7
941
+ Performance/BindCall:
942
+ Enabled: false
943
+
944
+ # TODO: OLD RUBIES - Requites 2.5
945
+ Performance/DeletePrefix:
946
+ Enabled: false
947
+
948
+ # TODO: OLD RUBIES - Requires 2.7
949
+ Performance/MapCompact:
950
+ Enabled: false
951
+
952
+ # TODO: Enable when time can be spent on it (no autocorrect)
953
+ Performance/MethodObjectAsBlock:
954
+ Enabled: false
955
+
956
+ # TODO: OLD RUBIES - Requires 2.4
957
+ Performance/RegexpMatch:
958
+ Enabled: false
959
+
960
+ # TODO: OLD RUBIES - Requires 2.4
961
+ Performance/Sum:
962
+ Enabled: false
963
+
964
+ # TODO: OLD RUBIES - Requires 2.3
965
+ Performance/UnfreezeString:
966
+ Enabled: false
967
+
968
+ # Disabling for now
969
+ Security/Eval:
970
+ Enabled: false
971
+
972
+ # Disabling for now
973
+ Security/JSONLoad:
974
+ Enabled: false
975
+ # AutoCorrect: false
976
+ # SafeAutoCorrect: false
977
+
978
+ Security/MarshalLoad:
979
+ Enabled: false
980
+
981
+ Security/Open:
982
+ Enabled: true
983
+ Safe: false
984
+
985
+ # Disabling for now
986
+ Security/YAMLLoad:
987
+ Enabled: false
988
+ # SafeAutoCorrect: false
989
+
990
+ Security/IoMethods:
991
+ Enabled: false
992
+ Safe: false
993
+
994
+ # raised unrecognized cop or department
995
+ # Standard/BlockSingleLineBraces:
996
+ # Enabled: true
997
+
998
+ Style/AccessModifierDeclarations:
999
+ Enabled: false
1000
+
1001
+ Style/AccessorGrouping:
1002
+ Enabled: false
1003
+
1004
+ # Disabling for now
1005
+ Style/Alias:
1006
+ Enabled: false
1007
+ # EnforcedStyle: prefer_alias_method
1008
+
1009
+ # Disabling for now
1010
+ Style/AndOr:
1011
+ Enabled: false
1012
+
1013
+ # Disabled for support of older ruby versions
1014
+ Style/ArgumentsForwarding:
1015
+ Enabled: false
1016
+
1017
+ Style/ArrayCoercion:
1018
+ Enabled: false
1019
+
1020
+ Style/ArrayJoin:
1021
+ Enabled: true
1022
+
1023
+ Style/AsciiComments:
1024
+ Enabled: false
1025
+
1026
+ Style/Attr:
1027
+ Enabled: true
1028
+
1029
+ Style/AutoResourceCleanup:
1030
+ Enabled: false
1031
+
1032
+ # Disabling for now
1033
+ Style/BarePercentLiterals:
1034
+ Enabled: false
1035
+ EnforcedStyle: bare_percent
1036
+
1037
+ Style/BeginBlock:
1038
+ Enabled: true
1039
+
1040
+ Style/BisectedAttrAccessor:
1041
+ Enabled: false
1042
+
1043
+ Style/BlockComments:
1044
+ Enabled: true
1045
+
1046
+ Style/BlockDelimiters:
1047
+ Enabled: false
1048
+
1049
+ Style/CaseEquality:
1050
+ Enabled: false
1051
+
1052
+ Style/CaseLikeIf:
1053
+ Enabled: false
1054
+
1055
+ Style/CharacterLiteral:
1056
+ Enabled: true
1057
+
1058
+ Style/ClassAndModuleChildren:
1059
+ Enabled: false
1060
+
1061
+ # Disabling for now
1062
+ Style/ClassCheck:
1063
+ Enabled: false
1064
+ # EnforcedStyle: is_a?
1065
+
1066
+ # Disabling for now
1067
+ Style/ClassEqualityComparison:
1068
+ Enabled: false
1069
+
1070
+ Style/ClassMethods:
1071
+ Enabled: true
1072
+
1073
+ Style/ClassMethodsDefinitions:
1074
+ Enabled: false
1075
+
1076
+ Style/ClassVars:
1077
+ Enabled: false
1078
+
1079
+ Style/CollectionCompact:
1080
+ Enabled: false
1081
+
1082
+ Style/CollectionMethods:
1083
+ Enabled: false
1084
+
1085
+ # Disabling for now
1086
+ Style/ColonMethodCall:
1087
+ Enabled: false
1088
+
1089
+ Style/ColonMethodDefinition:
1090
+ Enabled: true
1091
+
1092
+ Style/CombinableLoops:
1093
+ Enabled: false
1094
+
1095
+ # Disabling for now
1096
+ Style/CommandLiteral:
1097
+ Enabled: false
1098
+ # EnforcedStyle: mixed
1099
+ # AllowInnerBackticks: false
1100
+
1101
+ Style/CommentedKeyword:
1102
+ Enabled: false
1103
+
1104
+ # Disabling for now
1105
+ Style/ConditionalAssignment:
1106
+ Enabled: false
1107
+ # EnforcedStyle: assign_to_condition
1108
+ # SingleLineConditionsOnly: true
1109
+ # IncludeTernaryExpressions: true
1110
+
1111
+ Style/ConstantVisibility:
1112
+ Enabled: false
1113
+
1114
+ Style/Copyright:
1115
+ Enabled: false
1116
+
1117
+ Style/DateTime:
1118
+ Enabled: false
1119
+
1120
+ Style/DefWithParentheses:
1121
+ Enabled: true
1122
+
1123
+ # Disabling for now
1124
+ Style/Dir:
1125
+ Enabled: false
1126
+
1127
+ Style/DisableCopsWithinSourceCodeDirective:
1128
+ Enabled: false
1129
+
1130
+ Style/DocumentDynamicEvalDefinition:
1131
+ Enabled: false
1132
+
1133
+ Style/Documentation:
1134
+ Enabled: false
1135
+
1136
+ Style/DocumentationMethod:
1137
+ Enabled: false
1138
+
1139
+ Style/DoubleCopDisableDirective:
1140
+ Enabled: false
1141
+
1142
+ Style/DoubleNegation:
1143
+ Enabled: false
1144
+
1145
+ Style/EachForSimpleLoop:
1146
+ Enabled: true
1147
+
1148
+ # Disabling for now
1149
+ Style/EachWithObject:
1150
+ Enabled: false
1151
+
1152
+ Style/EmptyBlockParameter:
1153
+ Enabled: true
1154
+
1155
+ # Disabling for now
1156
+ Style/EmptyCaseCondition:
1157
+ Enabled: false
1158
+
1159
+ Style/EmptyElse:
1160
+ Enabled: true
1161
+ EnforcedStyle: both
1162
+
1163
+ # Disabling for now
1164
+ Style/EmptyLambdaParameter:
1165
+ Enabled: false
1166
+
1167
+ # Disabling for now
1168
+ Style/EmptyLiteral:
1169
+ Enabled: false
1170
+
1171
+ # Disabling for now
1172
+ Style/EmptyMethod:
1173
+ Enabled: false
1174
+ # EnforcedStyle: expanded
1175
+
1176
+ Style/EndBlock:
1177
+ Enabled: true
1178
+ AutoCorrect: true
1179
+
1180
+ Style/EndlessMethod:
1181
+ Enabled: false
1182
+
1183
+ # The use of Dir.home should be preferred over ENV['HOME'], but as of
1184
+ # JRuby 9.3.3.0 the use of ENV['HOME'] is required to deliver the desired
1185
+ # functionality
1186
+ Style/EnvHome:
1187
+ Enabled: false
1188
+
1189
+ # Disabling for now
1190
+ Style/EvalWithLocation:
1191
+ Enabled: false
1192
+
1193
+ Style/EvenOdd:
1194
+ Enabled: false
1195
+
1196
+ Style/ExpandPathArguments:
1197
+ Enabled: false
1198
+
1199
+ Style/ExplicitBlockArgument:
1200
+ Enabled: false
1201
+
1202
+ Style/ExponentialNotation:
1203
+ Enabled: false
1204
+
1205
+ # TODO: MAJOR VERSION - Re-enable FetchEnvVar after dropping support for Ruby 2.2
1206
+ # Ruby 2.3+ allows for ENV.fetch('KEY') { default }
1207
+ Style/FetchEnvVar:
1208
+ Enabled: false
1209
+
1210
+ Style/FloatDivision:
1211
+ Enabled: false
1212
+
1213
+ # Disabling for now
1214
+ Style/For:
1215
+ Enabled: false
1216
+ # EnforcedStyle: each
1217
+
1218
+ Style/FormatString:
1219
+ Enabled: false
1220
+
1221
+ Style/FormatStringToken:
1222
+ Enabled: false
1223
+
1224
+ # Disabling for now
1225
+ Style/GlobalStdStream:
1226
+ Enabled: false
1227
+
1228
+ # Disabling for now
1229
+ Style/GlobalVars:
1230
+ Enabled: false
1231
+ # AllowedVariables: []
1232
+
1233
+ Style/GuardClause:
1234
+ Enabled: false
1235
+
1236
+ Style/HashAsLastArrayItem:
1237
+ Enabled: false
1238
+
1239
+ # Disabling for now
1240
+ Style/HashConversion:
1241
+ Enabled: false
1242
+
1243
+ Style/HashEachMethods:
1244
+ Enabled: false
1245
+
1246
+ Style/HashExcept:
1247
+ Enabled: true
1248
+
1249
+ Style/HashLikeCase:
1250
+ Enabled: false
1251
+
1252
+ # Documentation: https://docs.rubocop.org/rubocop/cops_style.html#stylehashsyntax
1253
+ # I believe we want either hash_rockets or no_mixed_keys
1254
+ # Disabling for now
1255
+ Style/HashSyntax:
1256
+ Enabled: false
1257
+ # EnforcedStyle: ruby19_no_mixed_keys
1258
+
1259
+ Style/HashTransformKeys:
1260
+ Enabled: false
1261
+
1262
+ Style/HashTransformValues:
1263
+ Enabled: false
1264
+
1265
+ # Disabling for now
1266
+ Style/IdenticalConditionalBranches:
1267
+ Enabled: false
1268
+
1269
+ # Disabling for now
1270
+ Style/IfInsideElse:
1271
+ Enabled: false
1272
+
1273
+ Style/IfUnlessModifier:
1274
+ Enabled: false
1275
+
1276
+ Style/IfUnlessModifierOfIfUnless:
1277
+ Enabled: true
1278
+
1279
+ Style/IfWithBooleanLiteralBranches:
1280
+ Enabled: true
1281
+
1282
+ Style/IfWithSemicolon:
1283
+ Enabled: true
1284
+
1285
+ Style/ImplicitRuntimeError:
1286
+ Enabled: false
1287
+
1288
+ Style/InPatternThen:
1289
+ Enabled: false
1290
+
1291
+ # Disabling for now
1292
+ Style/InfiniteLoop:
1293
+ Enabled: false
1294
+
1295
+ Style/InlineComment:
1296
+ Enabled: false
1297
+
1298
+ Style/InverseMethods:
1299
+ Enabled: false
1300
+
1301
+ Style/IpAddresses:
1302
+ Enabled: false
1303
+
1304
+ # Disabling for now
1305
+ Style/KeywordParametersOrder:
1306
+ Enabled: false
1307
+
1308
+ Style/Lambda:
1309
+ Enabled: false
1310
+
1311
+ Style/LambdaCall:
1312
+ Enabled: true
1313
+ EnforcedStyle: call
1314
+
1315
+ # Disabling for now
1316
+ Style/LineEndConcatenation:
1317
+ Enabled: false
1318
+ # SafeAutoCorrect: false
1319
+
1320
+ # TODO: OLD RUBIES - enable this cop after support for Ruby <= 2.5 has been
1321
+ # dropped. NewRelic::Agent::InfiniteTracing::Transformer.hash_to_attributes
1322
+ # currently does `values.map {}.to_h`. Newer Rubies should
1323
+ # use `values.to_h {}` instead.
1324
+ Style/MapToHash:
1325
+ Enabled: false
1326
+
1327
+ Style/MethodCallWithArgsParentheses:
1328
+ Enabled: true
1329
+ AllowedMethods:
1330
+ - add_dependency
1331
+ - add_development_dependency
1332
+ - expect
1333
+ - fail
1334
+ - gem
1335
+ - include
1336
+ - print
1337
+ - puts
1338
+ - pp
1339
+ - raise
1340
+ - require
1341
+ - skip
1342
+ - source
1343
+ - stub
1344
+ AllowedPatterns: [^assert, ^refute]
1345
+
1346
+ Style/MethodCallWithoutArgsParentheses:
1347
+ Enabled: false
1348
+ AllowedMethods: []
1349
+
1350
+ Style/MethodCalledOnDoEndBlock:
1351
+ Enabled: false
1352
+
1353
+ Style/MethodDefParentheses:
1354
+ Enabled: true
1355
+
1356
+ Style/MinMax:
1357
+ Enabled: false
1358
+
1359
+ Style/MissingElse:
1360
+ Enabled: false
1361
+
1362
+ # Disabling for now
1363
+ Style/MissingRespondToMissing:
1364
+ Enabled: false
1365
+
1366
+ # Disabling for now
1367
+ Style/MixinGrouping:
1368
+ Enabled: false
1369
+ # EnforcedStyle: separated
1370
+
1371
+ # Disabling for now
1372
+ Style/MixinUsage:
1373
+ Enabled: false
1374
+
1375
+ Style/ModuleFunction:
1376
+ Enabled: false
1377
+
1378
+ Style/MultilineBlockChain:
1379
+ Enabled: false
1380
+
1381
+ Style/MultilineIfModifier:
1382
+ Enabled: true
1383
+
1384
+ Style/MultilineIfThen:
1385
+ Enabled: true
1386
+
1387
+ Style/MultilineInPatternThen:
1388
+ Enabled: false
1389
+
1390
+ # Disabling for now
1391
+ Style/MultilineMemoization:
1392
+ Enabled: false
1393
+ # EnforcedStyle: keyword
1394
+
1395
+ Style/MultilineMethodSignature:
1396
+ Enabled: false
1397
+
1398
+ Style/MultilineWhenThen:
1399
+ Enabled: true
1400
+
1401
+ Style/MultipleComparison:
1402
+ Enabled: false
1403
+
1404
+ Style/MutableConstant:
1405
+ Enabled: false
1406
+
1407
+ Style/NegatedIf:
1408
+ Enabled: false
1409
+
1410
+ Style/NegatedIfElseCondition:
1411
+ Enabled: false
1412
+
1413
+ Style/NegatedUnless:
1414
+ Enabled: false
1415
+
1416
+ # Disabling for now
1417
+ Style/NegatedWhile:
1418
+ Enabled: false
1419
+
1420
+ Style/NestedModifier:
1421
+ Enabled: true
1422
+
1423
+ # Disabling for now
1424
+ Style/NestedParenthesizedCalls:
1425
+ Enabled: false
1426
+ # AllowedMethods:
1427
+ # - be
1428
+ # - be_a
1429
+ # - be_an
1430
+ # - be_between
1431
+ # - be_falsey
1432
+ # - be_kind_of
1433
+ # - be_instance_of
1434
+ # - be_truthy
1435
+ # - be_within
1436
+ # - eq
1437
+ # - eql
1438
+ # - end_with
1439
+ # - include
1440
+ # - match
1441
+ # - raise_error
1442
+ # - respond_to
1443
+ # - start_with
1444
+
1445
+ Style/NestedTernaryOperator:
1446
+ Enabled: true
1447
+
1448
+ Style/Next:
1449
+ Enabled: false
1450
+
1451
+ # Disabling for now
1452
+ Style/NilLambda:
1453
+ Enabled: false
1454
+
1455
+ Style/Not:
1456
+ Enabled: true
1457
+
1458
+ # Disabling for now
1459
+ Style/NumericLiteralPrefix:
1460
+ Enabled: false
1461
+ # EnforcedOctalStyle: zero_with_o
1462
+
1463
+ Style/NumericLiterals:
1464
+ Enabled: false
1465
+
1466
+ Style/NumericPredicate:
1467
+ Enabled: false
1468
+
1469
+ Style/OneLineConditional:
1470
+ Enabled: true
1471
+
1472
+ # TODO: UNIT TESTS - tests relying on OpenStruct should be refactored to not
1473
+ # do so, given that the use of OpenStruct instances can
1474
+ # give a false sense of security with their extreme
1475
+ # flexibility that may not match realistic code behavior.
1476
+ Style/OpenStructUse:
1477
+ Enabled: false
1478
+
1479
+ Style/OptionHash:
1480
+ Enabled: false
1481
+
1482
+ Style/OptionalArguments:
1483
+ Enabled: true
1484
+
1485
+ Style/OptionalBooleanParameter:
1486
+ Enabled: false
1487
+
1488
+ Style/ParallelAssignment:
1489
+ Enabled: false
1490
+
1491
+ Style/ParenthesesAroundCondition:
1492
+ Enabled: true
1493
+ AllowSafeAssignment: true
1494
+ AllowInMultilineConditions: false
1495
+
1496
+ Style/PercentLiteralDelimiters:
1497
+ Enabled: true
1498
+ PreferredDelimiters:
1499
+ default: ()
1500
+ '%i': '[]'
1501
+ '%I': '[]'
1502
+ '%r': '{}'
1503
+ '%w': '[]'
1504
+ '%W': '[]'
1505
+
1506
+ Style/PercentQLiterals:
1507
+ Enabled: false
1508
+
1509
+ Style/PerlBackrefs:
1510
+ Enabled: false
1511
+
1512
+ Style/PreferredHashMethods:
1513
+ Enabled: false
1514
+
1515
+ Style/QuotedSymbols:
1516
+ Enabled: false
1517
+
1518
+ Style/RaiseArgs:
1519
+ Enabled: false
1520
+
1521
+ Style/RandomWithOffset:
1522
+ Enabled: true
1523
+
1524
+ Style/RedundantArgument:
1525
+ Enabled: false
1526
+
1527
+ # Disabling for now
1528
+ Style/RedundantAssignment:
1529
+ Enabled: false
1530
+
1531
+ # Disabling for now
1532
+ Style/RedundantBegin:
1533
+ Enabled: false
1534
+
1535
+ Style/RedundantCapitalW:
1536
+ Enabled: false
1537
+
1538
+ Style/RedundantCondition:
1539
+ Enabled: true
1540
+
1541
+ Style/RedundantConditional:
1542
+ Enabled: true
1543
+
1544
+ Style/RedundantException:
1545
+ Enabled: true
1546
+
1547
+ Style/RedundantFetchBlock:
1548
+ Enabled: true
1549
+
1550
+ Style/RedundantFileExtensionInRequire:
1551
+ Enabled: true
1552
+
1553
+ # Disabling for now
1554
+ Style/RedundantFreeze:
1555
+ Enabled: false
1556
+
1557
+ # Disabling for now
1558
+ Style/RedundantInterpolation:
1559
+ Enabled: false
1560
+
1561
+ # Disabling for now
1562
+ Style/RedundantParentheses:
1563
+ Enabled: false
1564
+
1565
+ # Disabling for now
1566
+ Style/RedundantPercentQ:
1567
+ Enabled: false
1568
+
1569
+ Style/RedundantRegexpCharacterClass:
1570
+ Enabled: true
1571
+
1572
+ # Disabling for now
1573
+ Style/RedundantRegexpEscape:
1574
+ Enabled: false
1575
+
1576
+ # Disabling for now
1577
+ Style/RedundantReturn:
1578
+ Enabled: false
1579
+ # AllowMultipleReturnValues: false
1580
+
1581
+ # Disabling for now
1582
+ Style/RedundantSelf:
1583
+ Enabled: false
1584
+
1585
+ Style/RedundantSelfAssignment:
1586
+ Enabled: false
1587
+
1588
+ Style/RedundantSelfAssignmentBranch:
1589
+ Enabled: false
1590
+
1591
+ # Disabling for now
1592
+ Style/RedundantSort:
1593
+ Enabled: false
1594
+
1595
+ Style/RedundantSortBy:
1596
+ Enabled: true
1597
+
1598
+ Style/RegexpLiteral:
1599
+ Enabled: false
1600
+
1601
+ # Disabling for now
1602
+ Style/RescueModifier:
1603
+ Enabled: false
1604
+
1605
+ # Disabling for now
1606
+ Style/RescueStandardError:
1607
+ Enabled: false
1608
+ # EnforcedStyle: implicit
1609
+
1610
+ Style/ReturnNil:
1611
+ Enabled: false
1612
+
1613
+ # Can't use, not available in Ruby 2.2
1614
+ Style/SafeNavigation:
1615
+ Enabled: false
1616
+ # ConvertCodeThatCanStartToReturnNil: false
1617
+ # AllowedMethods:
1618
+ # - present?
1619
+ # - blank?
1620
+ # - presence
1621
+ # - try
1622
+ # - try!
1623
+
1624
+ Style/Sample:
1625
+ Enabled: true
1626
+
1627
+ Style/SelfAssignment:
1628
+ Enabled: true
1629
+
1630
+ # Disabling for now
1631
+ Style/Semicolon:
1632
+ Enabled: false
1633
+ # AllowAsExpressionSeparator: false
1634
+
1635
+ Style/Send:
1636
+ Enabled: false
1637
+
1638
+ Style/SignalException:
1639
+ Enabled: false
1640
+
1641
+ Style/SingleArgumentDig:
1642
+ Enabled: false
1643
+
1644
+ Style/SingleLineBlockParams:
1645
+ Enabled: false
1646
+
1647
+ # Disabling for now
1648
+ Style/SingleLineMethods:
1649
+ Enabled: false
1650
+ # AllowIfMethodIsEmpty: false
1651
+
1652
+ # Disabled for support of older ruby versions
1653
+ Style/SlicingWithRange:
1654
+ Enabled: false
1655
+
1656
+ Style/SoleNestedConditional:
1657
+ Enabled: false
1658
+
1659
+ Style/SpecialGlobalVars:
1660
+ Enabled: false
1661
+
1662
+ Style/StabbyLambdaParentheses:
1663
+ Enabled: true
1664
+ EnforcedStyle: require_parentheses
1665
+
1666
+ Style/StaticClass:
1667
+ Enabled: false
1668
+
1669
+ # Do we want this one? Use warn instead of STDERR.puts
1670
+ Style/StderrPuts:
1671
+ Enabled: false
1672
+
1673
+ Style/StringChars:
1674
+ Enabled: true
1675
+
1676
+ Style/StringConcatenation:
1677
+ Enabled: false
1678
+
1679
+ Style/StringHashKeys:
1680
+ Enabled: false
1681
+
1682
+ # Disabling for now
1683
+ Style/StringLiterals:
1684
+ Enabled: false
1685
+ # EnforcedStyle: double_quotes
1686
+ # ConsistentQuotesInMultiline: false
1687
+
1688
+ # Disabling for now
1689
+ Style/StringLiteralsInInterpolation:
1690
+ Enabled: false
1691
+ # EnforcedStyle: double_quotes
1692
+
1693
+ Style/StringMethods:
1694
+ Enabled: false
1695
+
1696
+ Style/Strip:
1697
+ Enabled: true
1698
+
1699
+ Style/StructInheritance:
1700
+ Enabled: false
1701
+
1702
+ Style/SwapValues:
1703
+ Enabled: false
1704
+
1705
+ Style/SymbolArray:
1706
+ Enabled: false
1707
+
1708
+ # Disabling for now
1709
+ Style/SymbolLiteral:
1710
+ Enabled: false
1711
+
1712
+ Style/SymbolProc:
1713
+ Enabled: false
1714
+
1715
+ Style/TernaryParentheses:
1716
+ Enabled: true
1717
+ EnforcedStyle: require_no_parentheses
1718
+ AllowSafeAssignment: true
1719
+
1720
+ Style/TopLevelMethodDefinition:
1721
+ Enabled: false
1722
+
1723
+ Style/TrailingBodyOnClass:
1724
+ Enabled: true
1725
+
1726
+ Style/TrailingBodyOnMethodDefinition:
1727
+ Enabled: true
1728
+
1729
+ Style/TrailingBodyOnModule:
1730
+ Enabled: true
1731
+
1732
+ Style/TrailingCommaInArguments:
1733
+ Enabled: true
1734
+ EnforcedStyleForMultiline: no_comma
1735
+
1736
+ Style/TrailingCommaInArrayLiteral:
1737
+ Enabled: true
1738
+ EnforcedStyleForMultiline: no_comma
1739
+
1740
+ Style/TrailingCommaInBlockArgs:
1741
+ Enabled: true
1742
+
1743
+ Style/TrailingCommaInHashLiteral:
1744
+ Enabled: true
1745
+ EnforcedStyleForMultiline: no_comma
1746
+
1747
+ Style/TrailingMethodEndStatement:
1748
+ Enabled: true
1749
+
1750
+ Style/TrailingUnderscoreVariable:
1751
+ Enabled: false
1752
+
1753
+ # Do we want? Performance test first
1754
+ Style/TrivialAccessors:
1755
+ Enabled: false
1756
+ # ExactNameMatch: true
1757
+ # AllowPredicates: true
1758
+ # AllowDSLWriters: false
1759
+ # IgnoreClassMethods: false
1760
+ # AllowedMethods:
1761
+ # - to_ary
1762
+ # - to_a
1763
+ # - to_c
1764
+ # - to_enum
1765
+ # - to_h
1766
+ # - to_hash
1767
+ # - to_i
1768
+ # - to_int
1769
+ # - to_io
1770
+ # - to_open
1771
+ # - to_path
1772
+ # - to_proc
1773
+ # - to_r
1774
+ # - to_regexp
1775
+ # - to_str
1776
+ # - to_s
1777
+ # - to_sym
1778
+
1779
+ Style/UnlessElse:
1780
+ Enabled: true
1781
+
1782
+ Style/UnlessLogicalOperators:
1783
+ Enabled: false
1784
+
1785
+ # Disabling for now
1786
+ Style/UnpackFirst:
1787
+ Enabled: false
1788
+
1789
+ # Disabling for now
1790
+ Style/VariableInterpolation:
1791
+ Enabled: false
1792
+
1793
+ Style/WhenThen:
1794
+ Enabled: true
1795
+
1796
+ Style/WhileUntilDo:
1797
+ Enabled: true
1798
+
1799
+ Style/WhileUntilModifier:
1800
+ Enabled: false
1801
+
1802
+ # Disabling for now
1803
+ Style/YodaCondition:
1804
+ Enabled: false
1805
+ # EnforcedStyle: forbid_for_all_comparison_operators
1806
+
1807
+ Style/ZeroLengthPredicate:
1808
+ Enabled: false
1809
+
1810
+ Style/NumberedParameters:
1811
+ Enabled: false
1812
+
1813
+ Style/NumberedParametersLimit:
1814
+ Enabled: false
1815
+
1816
+ Style/SelectByRegexp:
1817
+ Enabled: false