-
Notifications
You must be signed in to change notification settings - Fork 126
/
.rubocop.yml
83 lines (65 loc) · 1.76 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
AllCops:
TargetRubyVersion: 3.2
# Use double quotes only for interpolation.
Style/StringLiterals:
EnforcedStyle: single_quotes
# Place dots at the beginning of multiline method calls.
Layout/DotPosition:
EnforcedStyle: leading
# Allow using {} when chaining methods
Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining
# The default of 80 characters is a little to narrow.
Layout/LineLength:
Max: 100
# Only place spaces inside blocks written with braces.
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
# Do not warn about missing magic comment
Style/FrozenStringLiteralComment:
Enabled: false
# Allow `json.(:attribute)`
Style/LambdaCall:
Enabled: false
# Do not use %i for symbol arrays
Style/SymbolArray:
EnforcedStyle: brackets
# In specs methods using RSpec DSL often become complex
Metrics/AbcSize:
Exclude:
- '**/spec/**/*'
# Ignore long RSpec and ActiveAdmin blocks
Metrics/BlockLength:
ExcludedMethods: ['describe', 'context', 'feature', 'it', 'namespace']
Exclude:
- '**/spec/factories/*.rb'
- '**/admins/pageflow/*.rb'
# In specs methods using RSpec DSL often become long
Metrics/MethodLength:
Exclude:
- '**/app/views/components/**/*'
- '**/spec/**/*'
# Long spec files are ok
Metrics/ModuleLength:
Exclude:
- '**/spec/**/*'
Metrics/ParameterLists:
CountKeywordArgs: false
# Do not require class documentation for specs and migrations
Style/Documentation:
Exclude:
- admins/**/*
- '**/spec/**/*'
- db/migrate/*
# Both ['...'] and %w(...) are fine
Style/WordArray:
Enabled: false
# Both [] and %i(...) are fine
Style/SymbolArray:
Enabled: false
# extend self is fine
Style/ModuleFunction:
Enabled: false
# Allow method names like has_text?
Naming/PredicateName:
Enabled: false