.rubocop.yml 2.01 KB
Newer Older
1 2 3
require:
  - rubocop-rails

Matt Jankowski's avatar
Matt Jankowski committed
4 5 6 7 8 9 10 11 12 13 14 15
AllCops:
  TargetRubyVersion: 2.3
  Exclude:
  - 'spec/**/*'
  - 'db/**/*'
  - 'app/views/**/*'
  - 'config/**/*'
  - 'bin/*'
  - 'Rakefile'
  - 'node_modules/**/*'
  - 'Vagrantfile'
  - 'vendor/**/*'
16
  - 'lib/json_ld/*'
17
  - 'lib/templates/**/*'
Eugen Rochko's avatar
Eugen Rochko committed
18

Matt Jankowski's avatar
Matt Jankowski committed
19
Bundler/OrderedGems:
Eugen Rochko's avatar
Eugen Rochko committed
20 21
  Enabled: false

Matt Jankowski's avatar
Matt Jankowski committed
22 23
Layout/AccessModifierIndentation:
  EnforcedStyle: indent
24

25 26 27
Layout/EmptyLineAfterMagicComment:
  Enabled: false

Matt Jankowski's avatar
Matt Jankowski committed
28 29
Layout/SpaceInsideHashLiteralBraces:
  EnforcedStyle: space
30

31
Metrics/AbcSize:
32 33
  Max: 100

34
Metrics/BlockLength:
35
  Max: 35
36 37 38
  Exclude:
    - 'lib/tasks/**/*'

39 40 41 42 43
Metrics/BlockNesting:
  Max: 3

Metrics/ClassLength:
  CountComments: false
44
  Max: 300
45 46

Metrics/CyclomaticComplexity:
47
  Max: 25
48

Matt Jankowski's avatar
Matt Jankowski committed
49 50 51 52
Metrics/LineLength:
  AllowURI: true
  Enabled: false

53
Metrics/MethodLength:
Matt Jankowski's avatar
Matt Jankowski committed
54
  CountComments: false
55 56 57 58 59 60
  Max: 55

Metrics/ModuleLength:
  CountComments: false
  Max: 200

61
Metrics/ParameterLists:
62
  Max: 5
63 64
  CountKeywordArgs: true

Matt Jankowski's avatar
Matt Jankowski committed
65
Metrics/PerceivedComplexity:
66
  Max: 20
Matt Jankowski's avatar
Matt Jankowski committed
67

68 69 70
Naming/MemoizedInstanceVariableName:
  Enabled: false

Matt Jankowski's avatar
Matt Jankowski committed
71 72 73
Rails:
  Enabled: true

74 75 76
Rails/EnumHash:
  Enabled: false

Matt Jankowski's avatar
Matt Jankowski committed
77 78 79
Rails/HasAndBelongsToMany:
  Enabled: false

80 81 82
Rails/SkipsModelValidations:
  Enabled: false

83 84 85
Rails/HttpStatus:
  Enabled: false

86 87 88
Rails/Exit:
  Exclude:
    - 'lib/mastodon/*'
89
    - 'lib/cli.rb'
90

91 92 93
Rails/HelperInstanceVariable:
  Enabled: false

Matt Jankowski's avatar
Matt Jankowski committed
94 95
Style/ClassAndModuleChildren:
  Enabled: false
96 97 98 99 100 101 102 103 104 105

Style/CollectionMethods:
  Enabled: true
  PreferredMethods:
    find_all: 'select'

Style/Documentation:
  Enabled: false

Style/DoubleNegation:
106
  Enabled: true
107

108 109 110
Style/FormatStringToken:
  Enabled: false

111
Style/FrozenStringLiteralComment:
112
  Enabled: true
113

Matt Jankowski's avatar
Matt Jankowski committed
114
Style/GuardClause:
115 116
  Enabled: false

117 118 119
Style/Lambda:
  Enabled: false

120 121 122 123 124
Style/PercentLiteralDelimiters:
  PreferredDelimiters:
    '%i': '()'
    '%w': '()'

Matt Jankowski's avatar
Matt Jankowski committed
125 126
Style/PerlBackrefs:
  AutoCorrect: false
127

Matt Jankowski's avatar
Matt Jankowski committed
128
Style/RegexpLiteral:
yhirano's avatar
yhirano committed
129 130
  Enabled: false

131 132 133
Style/SymbolArray:
  Enabled: false

Chikahiro Tokoro's avatar
Chikahiro Tokoro committed
134 135 136 137
Style/TrailingCommaInArrayLiteral:
  EnforcedStyleForMultiline: 'comma'

Style/TrailingCommaInHashLiteral:
Matt Jankowski's avatar
Matt Jankowski committed
138
  EnforcedStyleForMultiline: 'comma'