-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.rubocop.yml
121 lines (95 loc) · 2.4 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
118
119
120
121
inherit_from: .rubocop_todo.yml
AllCops:
Include:
- 'lib/**/*'
Exclude:
- 'bin/*'
- 'spec/*'
- 'spec/**/*'
- 'script/**/*'
- 'test/*'
- 'test/**/*'
- 'vendor/**/*'
- 'examples/**/*'
- 'profile/**/*'
- 'tmp/**/*'
- 'lib/**/*.erb'
- 'deprecated/**/*'
- '*'
DisplayCopNames: true
TargetRubyVersion: '2.3'
# TODO
Style/Documentation:
Enabled: false
# My personal style
# -----------------
# See http://zverok.github.io/blog/2016-02-23-control-flow.html
Style/AndOr:
Enabled: false
Style/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
# I prefer {} for all one-line blocks AND all functional blocks, which Rubocop can't.
Style/BlockDelimiters:
Enabled: false
Style/FrozenStringLiteralComment:
EnforcedStyle: when_needed
Style/SignalException:
EnforcedStyle: semantic
# Good docs can have really long lines.
Metrics/LineLength:
Enabled: false
Style/Alias:
EnforcedStyle: prefer_alias_method
# Proper parsing is hard!
# -----------------------
Metrics/MethodLength:
Exclude:
- 'lib/mediawiktory/generator.rb'
- 'lib/mediawiktory/generator/*'
- 'lib/nokogiri/more.rb'
Metrics/CyclomaticComplexity:
Exclude:
- 'lib/mediawiktory/generator/*'
Metrics/AbcSize:
Exclude:
- 'lib/mediawiktory/generator.rb'
- 'lib/mediawiktory/generator/*'
- 'lib/nokogiri/more.rb'
# Generated code: hard to support some conventions
# ------------------------------------------------
Style/DefWithParentheses:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
# Methods in generated code are reflecting MediaWiki option names, which could be inSadCamelCase
Style/MethodName:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
# WTF, rubocop???
Style/ClassAndModuleChildren:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Metrics/ClassLength:
Max: 218
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Metrics/ModuleLength:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Style/EmptyLinesAroundClassBody:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Style/EmptyLinesAroundModuleBody:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Style/TrailingWhitespace:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Style/WordArray:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Style/SymbolArray:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'
Style/StringLiterals:
Exclude:
- 'lib/mediawiktory/wikipedia/**/*'