-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
110 lines (88 loc) · 2.04 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
require: rubocop-minitest
AllCops:
TargetRubyVersion: 2.6
Exclude:
- 'bin/*'
- 'builds/**/*'
- 'config/**/*'
- 'db/**/*'
- 'gems/**/*'
- 'node_modules/**/*'
- 'script/**/*'
- 'vendor/**/*'
- '**/bin/*'
- '**/Capfile'
- '**/Guardfile'
# Avoid 'Missing top-level class documentation comment'
Documentation:
Enabled: false
Layout/IndentationWidth:
Width: 2
Layout/LeadingCommentSpace:
Enabled: false
Layout/LineLength:
Max: 120
Exclude:
- 'test/**/*.rb'
# The ABC size is a calculated magnitude, so this number can be a Fixnum or a Float (default 15)
Metrics/AbcSize:
Exclude:
- 'test/factories/**/*.rb'
- 'test/support/**/*.rb'
Metrics/BlockLength:
Exclude:
- '**/*.rake'
- 'test/factories/*.rb'
- 'test/**/*.rb'
- Gemfile
Metrics/ClassLength:
Enabled: true
Exclude:
- '**/*_spec.rb'
- '**/*.rake'
- 'test/factories/*.rb'
- 'test/**/*.rb'
Metrics/MethodLength:
CountComments: false # count full line comments?
Exclude:
- 'test/factories/**/*.rb'
- 'test/support/*.rb'
- 'test/**/*.rb'
Metrics/ModuleLength:
Enabled: true
Exclude:
- spec/**/*
- test/**/*
- "**/*.rake"
Naming/MemoizedInstanceVariableName:
Enabled: false
Naming/MethodParameterName:
Enabled: false
# Allow methods starting with 'has_'
Naming/PredicateName:
Enabled: false
# Allow inline declaration 'private def bar; end'
Style/AccessModifierDeclarations:
EnforcedStyle: inline
# Allow code-style 'my_condtion and return true'
Style/AndOr:
EnforcedStyle: conditionals
Style/AsciiComments:
Enabled: false
Style/BlockDelimiters:
Exclude:
- 'test/factories/*.rb'
- 'lib/tasks/**/*.rake'
Style/ClassAndModuleChildren:
Exclude:
- test/**/*.rb
# Should be deprecated in newer Rails-versions # https://bugs.ruby-lang.org/issues/11473#note-53
Style/FrozenStringLiteralComment:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/Semicolon:
AllowAsExpressionSeparator: true
Style/SymbolArray:
Exclude:
- 'test/factories/*.rb'