-
Notifications
You must be signed in to change notification settings - Fork 48
/
.rubocop.yml
153 lines (126 loc) · 3.08 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
AllCops:
TargetRubyVersion: 2.4
Exclude:
# Do not check code borrowed from ActiveSupport
- 'lib/dbus/core_ext/**/*.rb'
# Bundled dependencies
- 'vendor/**/*'
# RPM spec is not RSpec
- package/rubygem-ruby-dbus.spec
# https://github.com/SUSE/style-guides/blob/master/Ruby.md#strings
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
# https://github.com/SUSE/style-guides/blob/master/Ruby.md#arrays
Style/WordArray:
Enabled: false
Style/SymbolArray:
Enabled: false
Layout/IndentationConsistency:
Exclude:
# a conflict between markdown and ruby indentation
- examples/doc/variants.rb
# I am not ready to fix these
Style/IfUnlessModifier:
Enabled: false
# I am not ready to fix these
Style/WhileUntilModifier:
Enabled: false
# I am not ready to fix these
Style/NegatedIf:
Enabled: false
Style/EmptyElse:
EnforcedStyle: "nil"
# Need to check whether API stays OK
Lint/InheritException:
Exclude:
- 'lib/dbus.rb'
- 'lib/dbus/auth.rb'
- 'lib/dbus/connection.rb'
- 'lib/dbus/introspect.rb'
- 'lib/dbus/marshall.rb'
- 'lib/dbus/matchrule.rb'
- 'lib/dbus/message.rb'
- 'lib/dbus/type.rb'
# Offense count: 7
Lint/SuppressedException:
Exclude:
- 'lib/dbus/marshall.rb'
- 'lib/dbus/message_queue.rb'
- 'lib/dbus/xml.rb'
- 'spec/server_spec.rb'
- 'spec/service_newapi.rb'
# Offense count: 5
Lint/RescueException:
Exclude:
- 'examples/no-introspect/nm-test.rb'
- 'lib/dbus/connection.rb'
- 'lib/dbus/message_queue.rb'
Naming/PredicateName:
NamePrefix:
# has_ and have_ are allowed
- is_
# Offense count: 1
Lint/NestedMethodDefinition:
Exclude:
- 'spec/main_loop_spec.rb'
# Offense count: 34
Metrics/AbcSize:
Max: 123
# Offense count: 2
Metrics/BlockNesting:
Max: 4
Metrics/BlockLength:
Max: 70
Exclude:
- 'spec/*_spec.rb'
# Offense count: 8
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 330
# Offense count: 12
Metrics/CyclomaticComplexity:
Max: 29
# Offense count: 62
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
# URISchemes: http, https
Layout/LineLength:
Max: 118
# Offense count: 49
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 102
# Offense count: 9
Metrics/PerceivedComplexity:
Max: 27
# Offense count: 8
Style/ClassVars:
Exclude:
- 'lib/dbus/object.rb'
- 'lib/dbus/message.rb'
# Offense count: 16
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'examples/service/service_newapi.rb'
- 'lib/dbus/api_options.rb'
- 'lib/dbus/error.rb'
- 'lib/dbus/logger.rb'
- 'lib/dbus/message.rb'
- 'lib/dbus/message_queue.rb'
- 'lib/dbus/type.rb'
- 'lib/dbus/xml.rb'
# Buggy in 1.0, fixed in 1.12
# https://github.com/rubocop/rubocop/issues/5953
Style/AccessModifierDeclarations:
Enabled: false
# Offense count: 1
Style/OptionalArguments:
Exclude:
- 'lib/dbus/proxy_object_interface.rb'
Style/AsciiComments:
Exclude:
# Spell author name correctly
- 'lib/dbus/object_manager.rb'