-
Notifications
You must be signed in to change notification settings - Fork 0
/
standard_rubocop_config.yml
134 lines (106 loc) · 3.69 KB
/
standard_rubocop_config.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
require: rubocop-rspec
AllCops:
TargetRubyVersion: 2.7
NewCops: enable
# this hurts readability and makes code more confusing
# Rubocop has an opinion, Python has an opinion, I also have opinion
# and in this case I strongly prefer Python version
# I would gladly enable MethodCallRequireArgsParentheses
Style/MethodCallWithoutArgsParentheses:
Enabled: false
Style/DefWithParentheses:
Enabled: false
# not preferred as this rule makes harder to move/add/remove items
Style/TrailingCommaInArrayLiteral:
Enabled: false
Style/TrailingCommaInHashLiteral:
Enabled: false
# change without benefit ( foobar == nil into foobar.nil?)
Style/NilComparison:
Enabled: false
# single-quoted strings are worse as adding #{} requires changing ' back into "
Style/StringLiterals:
Enabled: false
# explicit return make easier to avoid subtle bugs on changing function
Style/RedundantReturn:
Enabled: false
# sometimes it is necessary to use UTF in comment (especially in cases where some special handling is necessary for nonASCII text)
Style/AsciiComments:
Enabled: false
# block comments are fine in my opinion
Style/BlockComments:
Enabled: false
# overcomplicated syntax without benefit
Style/WordArray:
Enabled: false
# it is likely to detect bugs, there is no point in masking them by running autocorrect
Lint/UnusedMethodArgument:
AutoCorrect: False
Lint/UnusedBlockArgument:
AutoCorrect: False
# see https://github.com/bbatsov/rubocop/issues/1747#issuecomment-223370141
# this auto-correct rule may break things and is not a clear improvement
Style/SpecialGlobalVars:
Enabled: false
# there is no benefit from ugly code of collapsed form
Style/EmptyMethod:
EnforcedStyle: expanded
# unconvinced that it is useful
Style/RaiseArgs:
Enabled: false
# adds useless line without benefit outweighting readability loss
Style/FrozenStringLiteralComment:
Enabled: false
# Ruby-specific syntax has no benefits whatsover over slashes
# if there is one let me know
Style/RegexpLiteral:
EnforcedStyle: slashes
# Standard array is much better and less overcomplicated
Style/SymbolArray:
EnforcedStyle: brackets
# Neither is much better, consistency is much more important
# for example see:
# group = ["#{fish[0]}", "#{fish[0]} filet", "filet z #{fish[1]}"]
# vs
# group = [(fish[0]).to_s, "#{fish[0]} filet", "filet z #{fish[1]}"]
Style/RedundantInterpolation:
Enabled: false
# local style optimization is better than global consistency
Style/StringLiteralsInInterpolation:
Enabled: false
# this rubyism is not more readable
Style/NumericPredicate:
Enabled: false
# this blank lines are neither helpful nor useful
Layout/EmptyLineAfterGuardClause:
Enabled: false
# not convinced that removing get_ is useful use of my time
Naming/AccessorMethodName:
Enabled: false
Naming/MethodParameterName:
AllowedNames:
- bb # standard shortening of "bounding box"
- r # standard shortening of "radius"
- mb # standard for megabytes
- x # typically perfectly fine for position to a plane
- "y" # typically perfectly fine for position to a plane
# avoiding jumboXXLplus lines is a good idea, but
# there is no reason to stick to 80 characters
# a bit longer lines seems fine to me
Layout/LineLength:
Max: 88
# disabled due to bug reported as https://github.com/rubocop-hq/rubocop/issues/6630
# note that bug is likely to be closed but wontfixed
Style/CommentAnnotation:
Enabled: false
# benefits from adding ? to the method names are outweighted
# by increased costs of context switch between languages
Naming/PredicateName:
Enabled: false
# Uncomment following rules to allow using tabs:
#Layout/Tab:
# Enabled: false
#Layout/IndentationConsistency:
# Enabled: false
#Layout/IndentationWidth:
# Enabled: false