forked from nbgallery/nbgallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
117 lines (92 loc) · 2.16 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
inherit_from: .rubocop_todo.yml
require:
- rubocop-rails
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.3
Exclude:
- 'docker/**/*' # local docker storage
- 'app/models/commontator/*.rb'
- 'db/schema.rb' # generated file
- 'bin/*' # rails framework
Metrics/AbcSize:
Max: 50
Exclude:
- 'test/*/*.rb'
Metrics/ClassLength:
Max: 500
Exclude:
- 'test/*/*.rb'
Metrics/ModuleLength:
Max: 200
Exclude:
- 'test/*/*.rb'
Metrics/CyclomaticComplexity:
Max: 10
Exclude:
- 'test/*/*.rb'
Layout/LineLength:
Max: 120
Exclude:
- 'config/initializers/devise.rb'
- 'test/*/*.rb'
Metrics/MethodLength:
Max: 50
Exclude:
- 'test/*/*.rb'
Metrics/PerceivedComplexity:
Max: 10
Exclude:
- 'test/*/*.rb'
Metrics/BlockLength:
Exclude:
- 'config/environments/*rb'
# Extra blank lines between methods helps readability
Layout/EmptyLines:
Enabled: false
# Turn off Frozen String Literal Comment
Style/FrozenStringLiteralComment:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/EmptyMethod:
Enabled: false
# There are legitimate uses for low-precedence and/or/not
Style/AndOr:
Enabled: false
Style/Not:
Enabled: false
# You don't usually put a space if you comment out a line of code
Layout/LeadingCommentSpace:
Enabled: false
# Sorry, too awesome to ban
Style/RescueModifier:
Enabled: false
# Every other language goes with no_space
Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
# We like no_space here
Layout/SpaceInsideBlockBraces:
EnforcedStyle: no_space
SpaceBeforeBlockParameters: false
# The Rails guide disagrees
Rails/HasAndBelongsToMany:
Enabled: false
# We're not on Rails 5 yet
Rails/ApplicationRecord:
Enabled: false
Rails/ApplicationJob:
Enabled: false
# This is a new rule and we don't want to update old migrations.
# On a fresh install they'll be fast enough anyway.
Rails/BulkChangeTable:
Exclude:
- 'db/migrate/2016*'
- 'db/migrate/2017*'
- 'db/migrate/201803*'
# We only do this to quiet rubocop
Style/CommentedKeyword:
Enabled: false
# Micromanagement
Naming/MethodParameterName:
Enabled: false