-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rubocop.yml
106 lines (83 loc) · 2.3 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
# Rubocop configuration, see https://docs.rubocop.org/rubocop/configuration.html
require:
- rubocop-rspec
- rubocop-rails
- rubocop-performance
# opt-in to new rules (cops)
AllCops:
NewCops: enable
#
# Specific excludes & includes
#
# Ignore LineLength for config files (e.g. with long secret strings)
Layout/LineLength:
Exclude:
- 'config/**/*'
# Ignore 'Use $stdout instead of STDOUT' in configs
Style/GlobalStdStream:
Exclude:
- 'config/**/*'
# Ignore "Block has too many lines" for specs, `RSpec.describe` blocks can be long
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
- 'config/**/*'
# Okay because autogenerated migrations will fail
Metrics/AbcSize:
Exclude:
- 'db/migrate/*.rb'
Metrics/MethodLength:
Exclude:
- 'db/migrate/*.rb'
# Configs can complex options, may need custom layout
Layout/ArgumentAlignment:
Exclude:
- 'config/**/*'
Layout/HashAlignment:
Exclude:
- 'config/**/*'
# Only check "Missing top-level class documentation comment" for models
Style/Documentation:
Include:
- 'app/models/*.rb'
# The autogenerated file has a large comment block. So be it.
Style/BlockComments:
Exclude:
- 'spec/spec_helper.rb'
# Okay for special controllers interacting with devise
Style/ClassAndModuleChildren:
Exclude:
- app/controllers/users/*.rb
#
# Ignoring entire rules
#
# Okay to have empty lines around code blocks
Layout/EmptyLinesAroundBlockBody:
Enabled: false
# Ignore "Missing frozen string literal comment"
Style/FrozenStringLiteralComment:
Enabled: false
# Ignore "Gems should be sorted in an alphabetical order within their section of the Gemfile"
Bundler/OrderedGems:
Enabled: false
# Okay to have strings with "" instead of '', even when not doing interpolation
Style/StringLiterals:
Enabled: false
# Okay to have space in array definitions: [ 'a','b','c' ]
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
# Okay to use normal array syntax [:a, :b, :c] for symbols instead of %i or %I
Style/SymbolArray:
Enabled: false
# Okay to use Rails.root.join('tmp', 'caching-dev.txt')
Rails/FilePath:
Enabled: false
RSpec/InstanceVariable:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
# Okay if actually correct relationship
Rails/HasAndBelongsToMany:
Enabled: false