-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.rubocop.yml
134 lines (130 loc) · 2.7 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
require:
- rubocop-rspec
- rubocop-gitlab-security
AllCops:
DisabledByDefault: true
# Exclude:
# - 'tmp/**/*'
# - vendor/**/*
# - db/migrate/*
# - db/**
# DisplayCopNames: true
# TargetRubyVersion: 2.3
Style/Documentation:
Enabled: false
Layout/ExtraSpacing:
AllowForAlignment: true
Metrics/LineLength:
Max: 100
Metrics/BlockLength:
Exclude:
# Ignore migration DSL
- db/migrations/**/*
# Ignore RSpec DSL
- spec/**/*
# Ignore Rake task DSL
- Rakefile
Style/Next:
EnforcedStyle: always
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '[]'
'%I': '[]'
'%q': '{}'
'%Q': '{}'
'%r': '{}'
'%s': ()
'%w': '[]'
'%W': '[]'
'%x': ()
Style/TrivialAccessors:
ExactNameMatch: false
Style/SymbolArray:
Enabled: true
Style/BarePercentLiterals:
EnforcedStyle: percent_q
Style/CollectionMethods:
Enabled: true
Style/Send:
Enabled: true
Style/AutoResourceCleanup:
Enabled: true
Layout/FirstArrayElementLineBreak:
Enabled: true
Layout/FirstHashElementLineBreak:
Enabled: true
Layout/FirstMethodArgumentLineBreak:
Enabled: true
Layout/FirstMethodParameterLineBreak:
Enabled: true
Layout/MultilineArrayBraceLayout:
Enabled: true
Layout/MultilineAssignmentLayout:
EnforcedStyle: new_line
Enabled: true
Layout/MultilineHashBraceLayout:
Enabled: true
Layout/MultilineMethodCallBraceLayout:
Enabled: true
Layout/MultilineMethodDefinitionBraceLayout:
Enabled: true
Style/OptionHash:
Enabled: true
Style/StringMethods:
Enabled: true
Layout/IndentArray:
EnforcedStyle: consistent
Layout/IndentHash:
EnforcedStyle: consistent
MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/Alias:
EnforcedStyle: prefer_alias_method
Layout/AlignHash:
EnforcedColonStyle: table
Style/SignalException:
EnforcedStyle: semantic
Style/SingleLineBlockParams:
Enabled: false
Lint/UnneededSplatExpansion:
Enabled: false
Layout/DefEndAlignment:
AutoCorrect: true
Layout/EndAlignment:
AutoCorrect: true
Lint/UnifiedInteger:
Enabled: false
Metrics/AbcSize:
Max: 20
Metrics/LineLength:
Max: 120
# Style/AndOr:
# Enabled: false
Security/Eval:
Enabled: true
Security/JSONLoad:
Enabled: true
Security/MarshalLoad:
Enabled: true
Security/Open:
Enabled: true
Security/YAMLLoad:
Enabled: true
Bundler/InsecureProtocolSource:
Enabled: true
Rails/OutputSafety:
Enabled: true
# from gitlab
# bundle exec rubocop --require rubocop-gitlab-security
GitlabSecurity/DeepMunge:
Enabled: true
GitlabSecurity/JsonSerialization:
Enabled: true
GitlabSecurity/RedirectToParamsUpdate:
Enabled: true
GitlabSecurity/SendFileParams:
Enabled: true
GitlabSecurity/SqlInjection:
Enabled: true
GitlabSecurity/SystemCommandInjection:
Enabled: true