-
Notifications
You must be signed in to change notification settings - Fork 194
/
.rubocop.yml
103 lines (81 loc) · 2.6 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
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 2.3
Exclude:
- testing/**/*.rb
- vendor/**/*
# Don't require new lines between one-liner methods
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
# We don't have a strong opinion on how you use spaces inside braces
Layout/SpaceInsideHashLiteralBraces:
Enabled: false
# Doesn't work properly against Windows which lacks the execute permission bit
Lint/ScriptPermission:
Enabled: false
# Samples are fine
Lint/InterpolationCheck:
Exclude:
- samples/expert_irb.rb
# IRB sample is a rare example where we need to use eval
Security/Eval:
Exclude:
- samples/expert_irb.rb
# We sometimes need Java method names for interoperability
# Like java calling our methods like `controlResized`
Naming/MethodName:
Enabled: false
# Our heredocs are rarely more than a couple lines long so this doesn't seem
# that relevant
Naming/HeredocDelimiterNaming:
Enabled: false
# Perf tricks with frozen strings are silly in a rarely run Rake task
Performance/UnfreezeString:
Exclude:
- 'tasks/changelog.rb'
# We don't care about the performance of 10.times.map vs Array.new(10) {|i|...}
Performance/TimesMap:
Enabled: false
# We don't care if we do kind_of? or is_a?
Style/ClassCheck:
Enabled: false
# Don't ever try to take my `inject` from me, reduce is ok too
Style/CollectionMethods:
PreferredMethods:
inject: 'inject'
# Don't like the look for def thing i = 1; end
Style/EmptyMethod:
Enabled: false
# To make these actually constants is going to require significant changes to
# Shoes internals
Style/MutableConstant:
Exclude:
- shoes-core/lib/shoes/font.rb
- shoes-core/lib/shoes/color/dsl.rb
- shoes-core/lib/shoes/common/style.rb
# We prefer to avoid loop control magic
Style/Next:
Enabled: false
# We like to be flexible if we want to add in interpolation
# see discussion #859
Style/StringLiterals:
Enabled: false
# We don't care if you use %i or literal symbol arrays
Style/SymbolArray:
Enabled: false
# We like the flexibility of adding additional items to the hash
# see discussion in #859
Style/TrailingCommaInLiteral:
Enabled: false
# We dislike the 'variable, = []' style and prefer you put the _
# see discussion https://github.com/shoes/shoes4/pull/1310#discussion_r89694266
Style/TrailingUnderscoreVariable:
Enabled: false
# We have several places where, because of instance scoping in apps,
# we don't want to use attr_reader. (Also misattributes on predicate
# methods)
Style/TrivialAccessors:
Enabled: false
# We don't care if you use %w or literal string arrays
Style/WordArray:
Enabled: false