-
Notifications
You must be signed in to change notification settings - Fork 2
/
.rubocop.yml
137 lines (103 loc) · 2.44 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
require:
- rubocop-factory_bot
- rubocop-performance
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails
AllCops:
CacheRootDirectory: tmp/cache/
DisabledByDefault: true
Exclude:
- '**/bin/*'
- '**/node_modules/**/*'
- '**/tmp/**/*'
- '**/.git/**/*'
- '**/public/**/*'
- '**/rubocop_cache/**/*'
- '**/spec/test_identity_app/**/*'
- '**/vendor/**/*'
NewCops: enable
TargetRubyVersion: 3.1.6
Layout:
Enabled: true
Layout/EndOfLine:
Enabled: false
Layout/LineLength:
Enabled: false
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Lint:
Enabled: true
Lint/AmbiguousBlockAssociation:
# Exclude specs because rspec is deliberately using a special kind of block styling
Exclude:
- '**/spec/**/*'
Lint/AssignmentInCondition:
# If you want to assign in the conditional then the condition must be surrounded with ()
AllowSafeAssignment: true
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Lint/SuppressedException:
Enabled: false
Performance:
Enabled: true
# Note: Disabled because changing String#downcase & #== to #casecmp is breaking unicode-safe string comparison.
Performance/Casecmp:
Enabled: false
Style/AndOr:
# && / || instead of and / or
Enabled: true
Style/ArrayJoin:
# use join instead of *
Enabled: true
Style/DoubleNegation:
# Don't use cryptic !! syntax for checking not nil
Enabled: true
Style/MutableConstant:
# Have to freeze potentially mutable constants
Enabled: true
Style/Not:
# !x instead of (not x)
Enabled: true
Naming/ClassAndModuleCamelCase:
Enabled: true
Naming/ConstantName:
# SCREAMING_SNAKE_CASE
Enabled: true
Naming/FileName:
Enabled: true
Naming/MethodName:
Enabled: true
Naming/VariableName:
Enabled: true
RSpec/EmptyLineAfterSubject:
Exclude:
- '**/spec/factories/*.rb'
RSpec/RepeatedExampleGroupDescription:
Enabled: false
Rails:
Enabled: true
Rails/FilePath:
Enabled: false
Rails/RedundantPresenceValidationOnBelongsTo:
Enabled: false
Rails/I18nLocaleTexts:
Enabled: false
Rails/DynamicFindBy:
Whitelist:
- find_by_sql
- find_by_phone
- find_by_external_id
Rails/SaveBang:
AllowedReceivers:
- Stripe::Charge
- FacebookAds::CustomAudience.get.users
- FacebookAds::AdAccount.get.customaudiences