forked from decko-commons/decko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ruby-style.yml
117 lines (113 loc) · 2.87 KB
/
.ruby-style.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
AllCops:
Exclude:
- "doc/**/*"
- "coverage/**/*"
- "card/tmpsets/**/*"
- "card/db/schema.rb"
- "mod/*/{lib,assets}/{style,stylesheets}/*.css"
- "mod/*/{lib,assets}/{script,javascript}/*.js"
- "mod/*/{data/files,public,vendor}/**/*"
- "card/mod/core/data/**/*"
Layout/DotPosition:
EnforcedStyle: leading
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
Layout/ExtraSpacing:
Description: Do not use unnecessary spacing.
Enabled: false
Layout/LineLength:
Enabled: true
Max: 90
Exclude:
- '**/step_definitions/*_steps.rb'
Lint/AssignmentInCondition:
Enabled: true
AllowSafeAssignment: true
Metrics/MethodLength:
Enabled: true
CountComments: false
Max: 15
Metrics/BlockLength:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/ExampleLength:
Description: Checks for long examples.
Enabled: true
Max: 25
RSpec/FilePath:
Description: Checks that spec file paths are consistent with the test subject.
Enabled: true
CustomTransform:
RuboCop: rubocop
RSpec: rspec
Card: ""
IgnoreMethods: false
RSpec/NestedGroups:
Description: Checks for nested example groups.
Enabled: true
Max: 5
RSpec/ExpectActual:
Enabled: true
Exclude:
- "**/spec/routing/**/*"
Style/Encoding:
Description: Use UTF-8 as the source file encoding.
Enabled: false
Style/GuardClause:
Description: Check for conditionals that can be replaced with guard clauses
Enabled: true
Style/MethodDefParentheses:
Description: Checks if the method definitions have or don't have 252
Enabled: true
EnforcedStyle: require_no_parentheses
Style/RegexpLiteral:
Description: Use %r for regular expressions matching more than
`MaxSlashes` '/' characters. Use %r only for regular expressions
matching more than `MaxSlashes` '/' character.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
Enabled: true
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/Documentation:
Exclude:
- "{mod,card}/**/data/{transform,schema}/*.rb"
Style/FrozenStringLiteralComment:
Enabled: false
Style/Alias:
EnforcedStyle: prefer_alias_method
Style/EmptyCaseCondition:
Enabled: false
Style/FormatString:
EnforcedStyle: percent
SupportedStyles:
- format
- sprintf
- percent
Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: ()
'%i': '[]'
'%I': '[]'
'%r': '{}'
'%w': '[]'
'%W': '[]'
Style/CommentAnnotation:
Enabled: true
Style/CollectionMethods:
# Mapping from undesired method to desired_method
# e.g. to use `detect` over `find`:
#
# CollectionMethods:
# PreferredMethods:
# find: detect
Description: Preferred collection methods.
Enabled: false
PreferredMethods:
collect: 'map'
collect!: 'map!'
detect: 'find'
find_all: 'select'
reduce: 'inject'
Style/BracesAroundHashParameters:
EnforcedStyle: context_dependent