-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.rubocop.yml
101 lines (80 loc) · 2.78 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
require: rubocop-rails
AllCops:
TargetRubyVersion: 2.6.3
Severity: warning
Exclude:
- "db/migrate/*"
- "db/*/"
- "tmp/*/"
- "vendor/*/"
- "bin/*/"
- "log/*/"
- "node_modules/**/*"
# Guiding principle of classes is Single Responsibility Principle (SRP), SRP can't be accurately measured by Lines of Code
Metrics/ClassLength:
Enabled: false
# Too short methods lead to extraction of single-use methods, which can make
# the code easier to read (by naming things), but can also clutter the class
Metrics/MethodLength:
Max: 15
#Checks the block length, which is large sometimes in general
Metrics/BlockLength:
Enabled: false
# Commonly used screens these days easily fit more than 80 characters.
Metrics/LineLength:
Max: 80
# Single quotes being faster is hardly measurable and only affects parse time.
# Enforcing double quotes reduces the times where you need to change them
# when introducing an interpolation. Use single quotes only if their semantics
# are needed.
Style/StringLiterals:
EnforcedStyle: double_quotes
# This cop makes sure that certain binary operator methods have their sole parameter named other.
# I think it will be confusing calling the argument 'other' in all such cases
Naming/BinaryOperatorParameterName:
Enabled: false
# We are not writing any comments during coding
Documentation:
Enabled: false
#Frozen string literal is default in Ruby3.0, also
#The frozen string literal comment is only valid in Ruby 2.3+.
#causes issues in spec files , CHECK IF OKAY
Style/FrozenStringLiteralComment:
Enabled: false
#This cop tries to produce a complexity score that's a measure of the complexity the reader experiences when looking at a method.
#CHECK THIS, I couldn't figure out much importance
Metrics/PerceivedComplexity:
Enabled: false
# The cyclomatic complexity is the number of linearly independent paths through a method.
# The algorithm counts decision points and adds one
#CHECK FOR MAX VALUE default is 6
Metrics/CyclomaticComplexity:
Max: 8
# Enabled: false
# its the [A]ssignemnts, [B]ranches, and [C]onditions size,
#CHECK MAX VALUE REQUIREMENT, default is 15
Metrics/AbcSize:
Max: 18
# Enabled: false
#Enforces use of %i or %I for an array of symbols, which is not required
Style/SymbolArray:
Enabled: false
#method naming convention
Naming/AccessorMethodName:
Enabled: true
# The space here provides no real gain in readability while consuming
Layout/SpaceInsideBlockBraces:
SpaceBeforeBlockParameters: true
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: space
Style/ClassAndModuleChildren:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
# Rubocop is marking variables used as useless in specs.
Lint/UselessAssignment:
Exclude:
- "spec/*/"
Enabled: false