-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
.rubocop.yml
114 lines (105 loc) · 3.18 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
inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- 'coverage/**/*'
- 'test/dummy/tmp/**/*'
- 'test/dummy/log/**/*'
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented, indented_relative_to_receiver
#
# Description from Rubocop Manual:
# This cop checks the indentation of the method name part in method calls
# that span more than one line.
#
# https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutmultilinemethodcallindentation
Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented_relative_to_receiver
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
IgnoredMethods:
- assert_output
- assert_raises
- assert_silent
- assert_throws
- refute_output
- refute_raises
- refute_silent
- refute_throws
# Offense count: 34
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
#
# Description from Rubocop Manual:
# https://rubocop.readthedocs.io/en/latest/cops_style/#styleclassandmodulechildren
Style/ClassAndModuleChildren:
Enabled: false
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues,
# PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
#
# Description from Rubocop Manual:
# This cop checks hash literal syntax
#
# https://rubocop.readthedocs.io/en/latest/cops_style/#stylehashsyntax
Style/HashSyntax:
Enabled: true
EnforcedStyle: ruby19
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinSize.
# SupportedStyles: percent, brackets
#
# Description from Rubocop Manual:
# Check for array literals made up of symbols that are not using
# the `%i()` syntax.
#
# https://rubocop.readthedocs.io/en/latest/cops_style/#stylesymbolarray
Style/SymbolArray:
Enabled: true
EnforcedStyle: percent
MinSize: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
Enabled: true
EnforcedStyle: percent
MinSize: 3
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
inherit_mode:
merge:
- Exclude
- ExcludedMethod
Exclude:
- 'lib/devise_token_auth/engine.rb'
- 'test/dummy/config/**/*'
- 'test/dummy/db/**/*'
ExcludedMethods:
- describe
- draw
- namespace
- devise_scope
- unnest_namespace
Max: 25
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
inherit_mode:
merge:
- Exclude
Exclude:
- 'test/**/*'
- 'Guardfile'
- 'devise_token_auth.gemspec'
IgnoredPatterns:
- '(\A|\s)#'
Max: 80