-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop_drama.yml
155 lines (123 loc) · 2.76 KB
/
.rubocop_drama.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
require: rubocop-rails
AllCops:
TargetRubyVersion: 2.6.5
TargetRailsVersion: 6.0.2.1
Exclude:
- 'bin/**/*'
- 'config/**/*'
- 'db/**/*'
- 'test/**/*'
- 'app/lib/**/*'
- 'Gemfile*'
- './*'
##########
# Enable #
##########
# Rails용 교정도 허용
Rails:
Enabled: true
###########
# Disable #
###########
# Non-ascii 문자도 허용한다
Style/AsciiComments:
Enabled: false
# Class body 시작과 끝에는 공백을 넣는다
Layout/EmptyLinesAroundClassBody:
Enabled: false
# Module body 시작과 끝에는 공백을 넣는다
Layout/EmptyLinesAroundModuleBody:
Enabled: false
# 클래스 주석은 필요한 경우에만 추가한다
Style/Documentation:
Enabled: false
Lint/SuppressedException:
Exclude:
- bin/*
# Test code에 대해서는 block 길이 신경쓰지 말자
Metrics/BlockLength:
Exclude:
- test/**/*.rb
- spec/**/*.rb
# 2글자 이하 변수명도 허용
Naming/MethodParameterName:
Enabled: false
##################
# Configurations #
##################
Rails/UnknownEnv:
Environments:
- development
- test
- production
- integration
- alpha
- bravo
- staging
Rails/FilePath:
EnforcedStyle: arguments
# 한 줄의 최대 길이 140자
Layout/LineLength:
Max: 140
# To make it possible to copy or click on URIs in the code, we allow lines
# containing a URI to be longer than Max.
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
Layout/TrailingEmptyLines:
EnforcedStyle: final_newline
Layout/MultilineMethodCallIndentation:
Exclude:
- "spec/**/*"
Lint/AmbiguousBlockAssociation:
Exclude:
- "spec/**/*"
# Class body의 최대 길이는 200줄
Metrics/ClassLength:
CountComments: false # count full line comments?
Max: 200
Exclude:
- test/**/*.rb
# Module body의 최대 길이는 200줄
Metrics/ModuleLength:
CountComments: false # count full line comments?
Max: 200
Exclude:
- test/**/*.rb
# Method의 최대 길이는 20줄 제한
Metrics/MethodLength:
CountComments: false # count full line comments?
Max: 20
# ABC 크기는 26
Metrics/AbcSize:
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
# a Float.
Max: 26
Metrics/CyclomaticComplexity:
Max: 10
Metrics/PerceivedComplexity:
Max: 10
Naming/PredicateName:
# Predicate name prefixes.
NamePrefix:
- is_
# Predicate name prefixes that should be removed.
ForbiddenPrefixes:
- is_
# % delimiter는 원래 하던 것 처럼 소괄호로
Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: ()
'%i': '()'
'%I': '()'
'%r': '{}'
'%w': '()'
'%W': '()'
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true