This repository has been archived by the owner on Dec 1, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.rubocop.yml
151 lines (129 loc) · 3.67 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
AllCops:
Include:
- 'Gemfile'
- 'Rakefile'
- 'lib/tasks/*'
- "**/*.rake"
- "**/Capfile"
- "**/Guardfile"
- "**/Vagrantfile"
- "**/Berksfile"
- "**/Cheffile"
Exclude:
- 'db/schema.rb'
- 'db/migrate/*'
- 'lib/tasks/cucumber.rake'
- 'bin/setup'
Lint/ParenthesesAsGroupedExpression:
Description: Checks for method calls with a space before the opening parenthesis.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
Enabled: true
Metrics/ClassLength:
Description: Avoid classes longer than 200 lines of code.
Enabled: true
CountComments: false
Max: 200
Metrics/AbcSize:
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
# a Float.
Max: 15
Enabled: false
Metrics/LineLength:
Description: Limit lines to 120 characters.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
Enabled: true
Max: 120
AllowURI: true
URISchemes:
- http
- https
Metrics/MethodLength:
Description: Avoid methods longer than 20 lines of code.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
Enabled: true
CountComments: false
Max: 20
Metrics/ModuleLength:
Description: Avoid modules longer than 100 lines of code.
Enabled: true
CountComments: false
Max: 100
Style/MultilineBlockLayout:
Description: 'Ensures newlines after multiline block do statements.'
Enabled: false
Rails/HasAndBelongsToMany:
Description: Prefer has_many :through to has_and_belongs_to_many.
Enabled: true
Include:
- app/models/**/*.rb
Rails/ScopeArgs:
Description: Checks the arguments of ActiveRecord scopes.
Enabled: true
Include:
- app/models/**/*.rb
Style/AndOr:
Description: Use &&/|| instead of and/or.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
Enabled: true
EnforcedStyle: conditionals
SupportedStyles:
- always
- conditionals
Style/Documentation:
Description: Document classes and non-namespace modules.
Enabled: false
Style/DotPosition:
Description: Checks the position of the dot in multi-line method calls.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
Enabled: true
EnforcedStyle: trailing
SupportedStyles:
- leading
- trailing
Style/ExtraSpacing:
Description: Do not use unnecessary spacing.
Enabled: true
Style/TrailingWhitespace:
Description: 'Avoid trailing whitespace.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
Enabled: true
Style/GuardClause:
Description: Check for conditionals that can be replaced with guard clauses
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
Enabled: true
MinBodyLength: 1
Style/StringLiterals:
Description: Checks if uses of quotes match the configured preference.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Style/SpaceBeforeBlockBraces:
EnforcedStyle: space
SupportedStyles:
- space
- no_space
Style/SpaceInsideBlockBraces:
EnforcedStyle: space
SupportedStyles:
- space
- no_space
# Valid values are: space, no_space
EnforcedStyleForEmptyBraces: no_space
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
SpaceBeforeBlockParameters: false
Style/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
EnforcedStyleForEmptyBraces: no_space
SupportedStyles:
- space
- no_space
Style/SpaceInsideStringInterpolation:
EnforcedStyle: no_space
SupportedStyles:
- space
- no_space
Style/StructInheritance:
Enabled: false