-
Notifications
You must be signed in to change notification settings - Fork 57
/
.rubocop.yml
127 lines (108 loc) · 2.74 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
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 3.1
Exclude:
# Exclude generated files from Rails
- bin/rails
- bin/rake
- bin/setup
- config/application.rb
- config/boot.rb
- config/environment.rb
- config/environments/development.rb
- config/environments/production.rb
- config/environments/test.rb
- config/initializers/assets.rb
- config/initializers/content_security_policy.rb
- config/initializers/cors.rb
- config/initializers/filter_parameter_logging.rb
- config/initializers/inflections.rb
- config/initializers/permissions_policy.rb
# Exclude others
- Vagrantfile
- tmp/**/*
- contrib/**/*
- db/schema.rb
# loading order actually matters
Bundler/OrderedGems:
Enabled: false
# old ruby style syntax may still be needed
Style/HashSyntax:
Enabled: false
# never break line due to length, except in data
# vim: set wrap
Layout/LineLength:
Max: 1024
# use and/or for flow control, but not in boolean assignments
# http://devblog.avdi.org/2010/08/02/using-and-and-or-in-ruby/
Style/AndOr:
Enabled: false
# use not with .select and flow control
Style/Not:
Enabled: false
# use self for clarity (args?)
#Style/RedundantSelf:
# Enabled: false
# I give up, the readability/security benefit is too small. Just use whatever quotes.
Style/StringLiterals:
Enabled: false
# use { only for single line blocks, but allow block content on its own line to keep line length short
# each { |l|
# l.apply_long_method_name
# }
Style/BlockDelimiters:
Enabled: false
# Do not use lambda
Style/Lambda:
Enabled: false
# allow TODO instead of requiring TODO:
Style/CommentAnnotation:
Enabled: false
# Vim prefers fixed indent, avoid manual vertical alignment
Layout/ParameterAlignment:
Enabled: true
EnforcedStyle: with_fixed_indentation
Layout/MultilineMethodCallIndentation:
Enabled: false
# Do not write 1234 as 1_234
Style/NumericLiterals:
Enabled: false
# Relax for controllers with multiple formats
Metrics/AbcSize:
Max: 40
Metrics/MethodLength:
Max: 40
# too spammy
Style/Documentation:
Enabled: false
Layout/HashAlignment:
Enabled: false
# adapt rubocop to existing code "style"
Style/IfUnlessModifier:
Enabled: false
Style/NumericPredicate:
Enabled: false
Style/RedundantReturn:
Enabled: false
Style/StringConcatenation:
Enabled: false
Style/ExpandPathArguments:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/WordArray:
Enabled: false
Layout/ArrayAlignment:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Layout/ArgumentAlignment:
Enabled: false
Layout/CommentIndentation:
Enabled: false
Style/NumericLiteralPrefix:
Enabled: false
Layout/LeadingCommentSpace:
Enabled: false