newrelic_rpm 6.10.0.364 → 8.15.0

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