forked from zapnap/mongoid-embedded-errors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
84 lines (70 loc) · 1.9 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
# Use RuboCop RSpec
require: rubocop-rspec
# Common configuration.
AllCops:
# Cop names are not displayed in offense messages by default. Change behavior
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
# option.
DisplayCopNames: true
Exclude:
- Guardfile
- gemfiles/*
- bin/*
- vendor/bundle/*
Rails:
Enabled: true
Naming/FileName:
Exclude:
- Appraisals
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
EnforcedStyleForEmptyBraces: no_space
SupportedStyles:
- space
- no_space
Metrics/MethodLength:
CountComments: false # count full line comments?
Max: 40
Metrics/AbcSize:
Max: 40
Metrics/LineLength:
Max: 120
Metrics/BlockLength:
Max: 50
Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false
Style/AutoResourceCleanup:
Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
Enabled: true
Style/CollectionMethods:
Description: 'Preferred collection methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
Enabled: true
Style/MethodCalledOnDoEndBlock:
Description: 'Avoid chaining a method call on a do...end block.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
Enabled: true
Layout/ExtraSpacing:
Description: 'Do not use unnecessary spacing.'
Enabled: true
Style/ClassAndModuleChildren:
# Checks the style of children definitions at classes and modules.
#
# Basically there are two different styles:
#
# `nested` - have each child on a separate line
# class Foo
# class Bar
# end
# end
#
# `compact` - combine definitions as much as possible
# class Foo::Bar
# end
#
# The compact style is only forced, for classes / modules with one child.
EnforcedStyle: compact
SupportedStyles:
- nested
- compact