forked from mvidner/ruby-dbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
141 lines (116 loc) · 2.81 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
# Do not check code borrowed from ActiveSupport
AllCops:
Exclude:
- 'lib/dbus/core_ext/**/*.rb'
# 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/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"
# Prefer readability over performance
Performance/RedundantBlockCall:
Enabled: false
# Need to check whether API stays OK
Lint/InheritException:
Exclude:
- 'lib/dbus.rb'
- 'lib/dbus/auth.rb'
- 'lib/dbus/bus.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/HandleExceptions:
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/gdbus/gdbus'
- 'examples/no-introspect/nm-test.rb'
- 'lib/dbus/bus.rb'
- 'lib/dbus/message_queue.rb'
Style/PredicateName:
NamePrefix:
# has_ and have_ are allowed
- is_
# Offense count: 1
Lint/Eval:
Exclude:
- 'examples/gdbus/gdbus'
# 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
# Offense count: 8
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 297
# Offense count: 12
Metrics/CyclomaticComplexity:
Max: 36
# Offense count: 62
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
# URISchemes: http, https
Metrics/LineLength:
Max: 118
# Offense count: 49
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 96
# Offense count: 9
Metrics/PerceivedComplexity:
Max: 27
# Offense count: 8
Style/ClassVars:
Exclude:
- 'lib/dbus/export.rb'
- 'lib/dbus/message.rb'
# Offense count: 16
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'examples/gdbus/gdbus'
- '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'
# Offense count: 1
Style/OptionalArguments:
Exclude:
- 'lib/dbus/proxy_object_interface.rb'