.rubocop.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. require:
  2. # https://docs.rubocop.org/rubocop-performance/
  3. - rubocop-performance
  4. AllCops:
  5. TargetRubyVersion: 3.1
  6. NewCops: enable
  7. Layout/EmptyLineAfterMagicComment:
  8. Enabled: false
  9. Metrics/BlockLength:
  10. Max: 40
  11. # Enable cops, which are not enabled by default.
  12. ## These cops are "Pending" by default.
  13. Performance/CollectionLiteralInLoop:
  14. Enabled: true
  15. Performance/BigDecimalWithNumericArgument:
  16. Enabled: true
  17. Performance/BlockGivenWithExplicitBlock:
  18. Enabled: true
  19. Performance/ConstantRegexp:
  20. Enabled: true
  21. Performance/MethodObjectAsBlock:
  22. Enabled: true
  23. Performance/RedundantSortBlock:
  24. Enabled: true
  25. Performance/RedundantStringChars:
  26. Enabled: true
  27. Performance/ReverseFirst:
  28. Enabled: true
  29. Performance/SortReverse:
  30. Enabled: true
  31. Performance/Squeeze:
  32. Enabled: true
  33. Performance/StringIdentifierArgument:
  34. Enabled: true
  35. Performance/StringInclude:
  36. Enabled: true
  37. Performance/Sum:
  38. Enabled: true
  39. ## These cops are "Disabled" by default.
  40. Performance/CaseWhenSplat:
  41. Enabled: true
  42. Performance/ChainArrayAllocation:
  43. Enabled: true
  44. Performance/IoReadlines:
  45. Enabled: true
  46. Performance/OpenStruct:
  47. Enabled: true
  48. Performance/SelectMap:
  49. Enabled: true
  50. # Disable cops, which are enabled by default.
  51. ## These cops are "Enabled" by default.
  52. Performance/Casecmp:
  53. Enabled: false
  54. Performance/RangeInclude:
  55. Enabled: false