forked from wikirate/wikirate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ruby-style.yml
114 lines (114 loc) · 2.7 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
AllCops:
TargetRubyVersion: 2.5
Include:
- '**/*.rb'
- "**/*.gemspec"
- "**/*.podspec"
- "**/*.jbuilder"
- "**/*.rake"
- "**/*.opal"
- "**/Gemfile"
- "**/Rakefile"
- "**/Capfile"
- "**/Guardfile"
- "**/Podfile"
- "**/Thorfile"
- "**/Vagrantfile"
- "**/Berksfile"
- "**/Cheffile"
- "**/Vagabondfile"
Exclude:
- "vendor/**/*"
- "db/schema.rb"
- "mod/deckorate_research/assets/script/jpages.js"
DisplayCopNames: false
StyleGuideCopsOnly: false
Style/CommentAnnotation:
Enabled: true
Style/CollectionMethods:
Description: Preferred collection methods.
Enabled: true
PreferredMethods:
collect: 'map'
collect!: 'map!'
detect: 'find'
find_all: 'select'
reduce: 'inject'
Layout/DotPosition:
EnforcedStyle: leading
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
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
Style/FrozenStringLiteralComment:
Enabled: false
Metrics/MethodLength:
Enabled: true
CountComments: false
Max: 15
Layout/ExtraSpacing:
Description: Do not use unnecessary spacing.
Enabled: false
Lint/AssignmentInCondition:
Enabled: true
AllowSafeAssignment: true
Lint/AmbiguousRegexpLiteral:
Exclude:
- '**/*_spec.rb'
Metrics/BlockLength:
Enabled: false
RSpec/ExampleLength:
Description: Checks for long examples.
Enabled: false
Max: 15
RSpec/FilePath:
Description: Checks that spec file paths are consistent with the test subject.
Enabled: true
CustomTransform:
RuboCop: rubocop
RSpec: rspec
Card: spec
IgnoreMethods: false
RSpec/NestedGroups:
Description: Checks for nested example groups.
Enabled: false
Max: 5
RSpec/InstanceVariable:
Enabled: false
Metrics/LineLength:
Enabled: true
Max: 90
RSpec/MultipleExpectations:
Enabled: false
Style/Documentation:
Exclude:
- db/migrate_cards/*.rb
Style/SymbolArray:
Enabled: false
Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: ()
'%i': '[]'
'%I': '[]'
'%r': '{}'
'%w': '[]'
'%W': '[]'
Style/Alias:
Enabled: false
AutoCorrect: false