You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
2.1 KiB

  1. require:
  2. - rubocop-rails
  3. AllCops:
  4. TargetRubyVersion: 2.4
  5. Exclude:
  6. - 'spec/**/*'
  7. - 'db/**/*'
  8. - 'app/views/**/*'
  9. - 'config/**/*'
  10. - 'bin/*'
  11. - 'Rakefile'
  12. - 'node_modules/**/*'
  13. - 'Vagrantfile'
  14. - 'vendor/**/*'
  15. - 'lib/json_ld/*'
  16. - 'lib/templates/**/*'
  17. Bundler/OrderedGems:
  18. Enabled: false
  19. Layout/AccessModifierIndentation:
  20. EnforcedStyle: indent
  21. Layout/EmptyLineAfterMagicComment:
  22. Enabled: false
  23. Layout/SpaceInsideHashLiteralBraces:
  24. EnforcedStyle: space
  25. Lint/UselessAccessModifier:
  26. ContextCreatingMethods:
  27. - class_methods
  28. Metrics/AbcSize:
  29. Max: 100
  30. Metrics/BlockLength:
  31. Max: 35
  32. Exclude:
  33. - 'lib/tasks/**/*'
  34. Metrics/BlockNesting:
  35. Max: 3
  36. Metrics/ClassLength:
  37. CountComments: false
  38. Max: 300
  39. Metrics/CyclomaticComplexity:
  40. Max: 25
  41. Layout/LineLength:
  42. AllowURI: true
  43. Enabled: false
  44. Metrics/MethodLength:
  45. CountComments: false
  46. Max: 55
  47. Metrics/ModuleLength:
  48. CountComments: false
  49. Max: 200
  50. Metrics/ParameterLists:
  51. Max: 5
  52. CountKeywordArgs: true
  53. Metrics/PerceivedComplexity:
  54. Max: 20
  55. Naming/MemoizedInstanceVariableName:
  56. Enabled: false
  57. Rails:
  58. Enabled: true
  59. Rails/EnumHash:
  60. Enabled: false
  61. Rails/HasAndBelongsToMany:
  62. Enabled: false
  63. Rails/SkipsModelValidations:
  64. Enabled: false
  65. Rails/HttpStatus:
  66. Enabled: false
  67. Rails/Exit:
  68. Exclude:
  69. - 'lib/mastodon/*'
  70. - 'lib/cli.rb'
  71. Rails/HelperInstanceVariable:
  72. Enabled: false
  73. Style/ClassAndModuleChildren:
  74. Enabled: false
  75. Style/CollectionMethods:
  76. Enabled: true
  77. PreferredMethods:
  78. find_all: 'select'
  79. Style/Documentation:
  80. Enabled: false
  81. Style/DoubleNegation:
  82. Enabled: true
  83. Style/FormatStringToken:
  84. Enabled: false
  85. Style/FrozenStringLiteralComment:
  86. Enabled: true
  87. Style/GuardClause:
  88. Enabled: false
  89. Style/Lambda:
  90. Enabled: false
  91. Style/PercentLiteralDelimiters:
  92. PreferredDelimiters:
  93. '%i': '()'
  94. '%w': '()'
  95. Style/PerlBackrefs:
  96. AutoCorrect: false
  97. Style/RegexpLiteral:
  98. Enabled: false
  99. Style/SymbolArray:
  100. Enabled: false
  101. Style/TrailingCommaInArrayLiteral:
  102. EnforcedStyleForMultiline: 'comma'
  103. Style/TrailingCommaInHashLiteral:
  104. EnforcedStyleForMultiline: 'comma'