-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
149 lines (136 loc) · 3.24 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# rubocop version 0.59.0
#
# Run this command to try Rubocop.
# -a: Fix automaticly all smells they could solve
# -D: Show cop names
# -S: Show URL style guide to solve this smell
#
# bundle exec rubocop -a -D -S
# Run this command to add Rubocop offenses at .rubocop_todo.yml. With this, this offenses
# will be ignored at future inspections, but only to fix them later.
# rubocop --auto-gen-config
# Them, check .rubocop_todo.yml file.
# Use this command commented at top of files to skip some or all Rubocop tests.
# Disable all cops example
# rubocop:disable all
# rubocop:enable all
# Visit http://www.rubydoc.info/gems/rubocop/RuboCop/Cop for more options and info.
# inherit_from: .rubocop_todo.yml
# Add files which you don't want Rubocop will check.
#
AllCops:
Exclude:
- Gemfile
- Guardfile
- Capfile
- infraestructure/**/*
- script/**/*
- 'node_modules/**/*'
- 'vendor/**/*'
- lib/tasks/**/*
- lib/capistrano/**/*
- lib/importations/**/*
- spec/**/*
- features/**/*
- db/**/*
- bin/**/*
- config/**/*
- app/views/**/*.json.jbuilder
- volumes/**/*
# Avoid documentation at top of classes. But if you want to write it, you are free to do it!
#
Documentation:
Enabled: false
### Rails Style ###
Rails:
Enabled: true
HasAndBelongsToMany:
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
Enabled: false
Bundler/OrderedGems:
Enabled: false
### Rails ###
# Skip use GTM time/date methods and trust in .today() or .now()
#
Rails/TimeZone:
Enabled: false
Rails/Date:
Enabled: false
### Style ###
# This blocks specifies some rules at code writing. You are free to change it, but be carefull
# about your teammates code. This is just a kind of standar.
#
Style/StringLiterals:
Enabled: true
EnforcedStyle: single_quotes
Style/SignalException:
EnforcedStyle: only_raise
Style/WordArray:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '()'
'%I': '()'
'%w': '()'
'%W': '()'
Style/ModuleFunction:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/AsciiComments:
Enabled: false
Style/NestedModifier:
Enabled: true
Style/Lambda:
Enabled: false
Style/RescueStandardError:
Enabled: false
### Metrics ###
# Change this in your legacy projects to skip refactor methods and classes. For new projects, just
# delete this block and try to write code with default Rubocop rules.
#
Metrics/BlockLength:
Max: 40
Metrics/BlockNesting:
CountBlocks: false
Max: 3
Metrics/ModuleLength:
Max: 300
Metrics/ClassLength:
Max: 300
Metrics/MethodLength:
Max: 40
Metrics/ParameterLists:
Max: 5
CountKeywordArgs: false
Metrics/CyclomaticComplexity:
Max: 30
Metrics/AbcSize:
Max: 80
Metrics/PerceivedComplexity:
Max: 30
Metrics/LineLength:
Max: 100
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
IgnoreCopDirectives: false
### Layout ###
Layout/SpaceInsideParens:
Enabled: true
Layout/SpaceInsideHashLiteralBraces:
Enabled: true
### Lint ###
Lint/AssignmentInCondition:
Enabled: false
### Naming ###
Naming/MemoizedInstanceVariableName:
Enabled: false