oxidized 0.25.1 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +30 -9
  3. data/.rubocop_todo.yml +16 -637
  4. data/.travis.yml +2 -3
  5. data/CHANGELOG.md +14 -0
  6. data/Dockerfile +7 -5
  7. data/README.md +18 -14
  8. data/Rakefile +2 -2
  9. data/bin/console +1 -1
  10. data/bin/oxidized +2 -2
  11. data/docs/Configuration.md +6 -0
  12. data/docs/Model-Notes/README.md +1 -0
  13. data/docs/Model-Notes/SmartAX-Huawei.md +35 -0
  14. data/docs/Supported-OS-Types.md +12 -0
  15. data/extra/nagios_check_failing_nodes.rb +1 -1
  16. data/extra/rest_client.rb +6 -8
  17. data/extra/syslog.rb +33 -33
  18. data/lib/oxidized/cli.rb +25 -26
  19. data/lib/oxidized/config.rb +9 -9
  20. data/lib/oxidized/config/vars.rb +3 -7
  21. data/lib/oxidized/core.rb +4 -7
  22. data/lib/oxidized/hook.rb +16 -17
  23. data/lib/oxidized/hook/awssns.rb +4 -4
  24. data/lib/oxidized/hook/exec.rb +16 -20
  25. data/lib/oxidized/hook/githubrepo.rb +8 -14
  26. data/lib/oxidized/hook/noophook.rb +1 -1
  27. data/lib/oxidized/hook/xmppdiff.rb +1 -1
  28. data/lib/oxidized/input/cli.rb +12 -12
  29. data/lib/oxidized/input/ftp.rb +8 -8
  30. data/lib/oxidized/input/http.rb +37 -14
  31. data/lib/oxidized/input/input.rb +6 -6
  32. data/lib/oxidized/input/ssh.rb +31 -31
  33. data/lib/oxidized/input/telnet.rb +24 -24
  34. data/lib/oxidized/input/tftp.rb +9 -10
  35. data/lib/oxidized/jobs.rb +7 -7
  36. data/lib/oxidized/manager.rb +13 -13
  37. data/lib/oxidized/model/acos.rb +2 -2
  38. data/lib/oxidized/model/aireos.rb +3 -3
  39. data/lib/oxidized/model/aos7.rb +1 -1
  40. data/lib/oxidized/model/aosw.rb +12 -14
  41. data/lib/oxidized/model/apc_aos.rb +1 -1
  42. data/lib/oxidized/model/aricentiss.rb +6 -8
  43. data/lib/oxidized/model/asa.rb +1 -1
  44. data/lib/oxidized/model/audiocodesmp.rb +28 -0
  45. data/lib/oxidized/model/awplus.rb +9 -9
  46. data/lib/oxidized/model/boss.rb +1 -1
  47. data/lib/oxidized/model/ciscosmb.rb +1 -1
  48. data/lib/oxidized/model/ciscovpn3k.rb +11 -0
  49. data/lib/oxidized/model/comware.rb +1 -1
  50. data/lib/oxidized/model/cumulus.rb +3 -1
  51. data/lib/oxidized/model/dellx.rb +5 -5
  52. data/lib/oxidized/model/edgeos.rb +1 -1
  53. data/lib/oxidized/model/edgeswitch.rb +1 -1
  54. data/lib/oxidized/model/fabricos.rb +1 -1
  55. data/lib/oxidized/model/fortios.rb +5 -5
  56. data/lib/oxidized/model/ftos.rb +1 -1
  57. data/lib/oxidized/model/gcombnps.rb +7 -7
  58. data/lib/oxidized/model/grandstream.rb +9 -0
  59. data/lib/oxidized/model/hatteras.rb +8 -8
  60. data/lib/oxidized/model/ios.rb +22 -40
  61. data/lib/oxidized/model/ironware.rb +1 -1
  62. data/lib/oxidized/model/junos.rb +1 -1
  63. data/lib/oxidized/model/mlnxos.rb +1 -1
  64. data/lib/oxidized/model/model.rb +32 -38
  65. data/lib/oxidized/model/netgearxs716.rb +23 -0
  66. data/lib/oxidized/model/netonix.rb +1 -1
  67. data/lib/oxidized/model/netscaler.rb +1 -1
  68. data/lib/oxidized/model/nos.rb +2 -2
  69. data/lib/oxidized/model/nxos.rb +1 -1
  70. data/lib/oxidized/model/openbsd.rb +3 -2
  71. data/lib/oxidized/model/outputs.rb +4 -4
  72. data/lib/oxidized/model/planet.rb +4 -4
  73. data/lib/oxidized/model/powerconnect.rb +8 -8
  74. data/lib/oxidized/model/procurve.rb +2 -1
  75. data/lib/oxidized/model/quantaos.rb +3 -3
  76. data/lib/oxidized/model/raisecom.rb +19 -0
  77. data/lib/oxidized/model/siklu.rb +1 -1
  78. data/lib/oxidized/model/slxos.rb +1 -1
  79. data/lib/oxidized/model/smartax.rb +25 -0
  80. data/lib/oxidized/model/sros.rb +4 -4
  81. data/lib/oxidized/model/tdre.rb +30 -0
  82. data/lib/oxidized/model/tmos.rb +3 -0
  83. data/lib/oxidized/model/trango.rb +17 -37
  84. data/lib/oxidized/model/voltaire.rb +1 -1
  85. data/lib/oxidized/model/voss.rb +1 -1
  86. data/lib/oxidized/model/vyatta.rb +1 -1
  87. data/lib/oxidized/model/xos.rb +1 -1
  88. data/lib/oxidized/model/zhoneolt.rb +1 -1
  89. data/lib/oxidized/node.rb +42 -46
  90. data/lib/oxidized/node/stats.rb +6 -6
  91. data/lib/oxidized/nodes.rb +42 -42
  92. data/lib/oxidized/output/file.rb +16 -20
  93. data/lib/oxidized/output/git.rb +68 -78
  94. data/lib/oxidized/output/gitcrypt.rb +77 -91
  95. data/lib/oxidized/output/http.rb +17 -19
  96. data/lib/oxidized/output/output.rb +1 -1
  97. data/lib/oxidized/source/csv.rb +3 -3
  98. data/lib/oxidized/source/http.rb +11 -14
  99. data/lib/oxidized/source/source.rb +3 -3
  100. data/lib/oxidized/source/sql.rb +16 -18
  101. data/lib/oxidized/string.rb +10 -10
  102. data/lib/oxidized/version.rb +4 -4
  103. data/lib/oxidized/worker.rb +15 -15
  104. data/oxidized.gemspec +6 -9
  105. metadata +32 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48b5a51180831f0f20a0ec56e8837fc84a19ebf9880b1d2dfda05ba06b81d389
4
- data.tar.gz: 7f1aaa288532a88b17ec529e7163291d0718c2a7de24f32b7867fd3d6687fd0c
3
+ metadata.gz: df69a0706706bd4a9544ff79d919000c24d34fceeb038a94026621952fd630cc
4
+ data.tar.gz: 1861d3ad6a6ed8d966b01cf5ba4f0d269cfe42a21cd604cb67262fbb8041da53
5
5
  SHA512:
6
- metadata.gz: f7a15d17f26f88e6be3af396b336154bf380e62f86faa0af7cd9870218bf8332a3f087eeafc77729a9ff17c6440c4002b72faafeac8005fd6ff558e1bf3dec65
7
- data.tar.gz: 80a5ea92d0e7e310e1d0971d5e8c931700d12661a26620cc4d1911801b1870bd094d7e8a11534220d5c1cdf56b942cd93c1b8e1b155c456aeb4ca7db6b04d87b
6
+ metadata.gz: bc8e1408a71b230254e00df082e0e077d9888476d6d62b03a515888246c93cce72b6bdc40fdbea63412d744b266f955323f2aa742cc68b50398ad0a335f62aea
7
+ data.tar.gz: 5243851ac172aa1337711b5a90cf7d71703c7d3af10f3b6514997fb2258898aff48fa572e39b999842dcb25e80fc7eab7240833ec0ab68a1a874a5867aaa1cac
@@ -1,19 +1,31 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
+ # Do not attempt to police vendored code
3
4
  AllCops:
4
- Include:
5
- - Rakefile
5
+ TargetRubyVersion: 2.3
6
+ Exclude:
7
+ - 'vendor/**/*'
6
8
 
7
9
  StringLiterals:
8
10
  Enabled: false
9
11
 
12
+ Style/FrozenStringLiteralComment:
13
+ Enabled: false
14
+
10
15
  LineLength:
11
16
  Enabled: false
12
17
 
18
+ Lint/AmbiguousRegexpLiteral:
19
+ Enabled: false
20
+
13
21
  # Stick to verbose until https://bugs.ruby-lang.org/issues/10177 is closed.
14
22
  Style/PreferredHashMethods:
15
23
  EnforcedStyle: verbose
16
24
 
25
+ Layout/AlignHash:
26
+ EnforcedHashRocketStyle: table
27
+ EnforcedColonStyle: table
28
+
17
29
  Style/Not:
18
30
  Enabled: false
19
31
 
@@ -30,14 +42,23 @@ Style/FormatStringToken:
30
42
  Style/RescueModifier:
31
43
  Enabled: false
32
44
 
33
- Style/MultilineBlockChain:
45
+ Style/SymbolProc:
34
46
  Enabled: false
35
47
 
36
- Style/SymbolProc:
48
+ Style/Documentation:
37
49
  Enabled: false
38
50
 
39
- # Do not attempt to police vendored code, and exclude special cases
40
- AllCops:
41
- Exclude:
42
- - 'vendor/**/*'
43
- - 'lib/oxidized/input/tftp.rb'
51
+ Style/ParallelAssignment:
52
+ Enabled: false
53
+
54
+ ## Metrics/AbcSize:
55
+ ## Max: 28
56
+ ##
57
+ ## Metrics/MethodLength:
58
+ ## Max: 20
59
+ ##
60
+ ## Metrics/ClassLength:
61
+ ## Max: 140
62
+ ##
63
+ ## Metrics/CyclomaticComplexity:
64
+ ## Max: 7
@@ -1,166 +1,49 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-06-08 09:41:49 +0200 using RuboCop version 0.57.1.
3
+ # on 2019-03-03 11:36:35 +0200 using RuboCop version 0.65.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
10
- # Configuration parameters: Include.
11
- # Include: **/*.gemspec
12
- Gemspec/RequiredRubyVersion:
13
- Exclude:
14
- - 'oxidized.gemspec'
15
-
16
- # Offense count: 4
17
- Lint/AmbiguousBlockAssociation:
18
- Exclude:
19
- - 'lib/oxidized/model/model.rb'
20
- - 'lib/oxidized/model/nos.rb'
21
-
22
- # Offense count: 684
23
- Lint/AmbiguousRegexpLiteral:
24
- Enabled: false
25
-
26
- # Offense count: 8
27
- # Configuration parameters: AllowSafeAssignment.
28
- Lint/AssignmentInCondition:
29
- Exclude:
30
- - 'extra/syslog.rb'
31
- - 'lib/oxidized/input/ssh.rb'
32
- - 'lib/oxidized/input/telnet.rb'
33
- - 'lib/oxidized/node.rb'
34
- - 'lib/oxidized/nodes.rb'
35
-
36
- # Offense count: 4
37
- # Cop supports --auto-correct.
38
- Lint/DeprecatedClassMethods:
39
- Exclude:
40
- - 'lib/oxidized/cli.rb'
41
- - 'lib/oxidized/output/file.rb'
42
- - 'lib/oxidized/output/gitcrypt.rb'
43
-
44
- # Offense count: 3
45
- Lint/HandleExceptions:
46
- Exclude:
47
- - 'lib/oxidized/input/ssh.rb'
48
- - 'lib/oxidized/input/telnet.rb'
49
- - 'lib/oxidized/nodes.rb'
50
-
51
- # Offense count: 2
52
- Lint/LiteralAsCondition:
53
- Exclude:
54
- - 'extra/syslog.rb'
55
- - 'lib/oxidized/core.rb'
56
-
57
- # Offense count: 4
58
- Lint/ParenthesesAsGroupedExpression:
59
- Exclude:
60
- - 'lib/oxidized/input/ssh.rb'
61
- - 'lib/oxidized/model/aricentiss.rb'
62
- - 'lib/oxidized/model/asa.rb'
63
- - 'lib/oxidized/model/ios.rb'
64
-
65
- # Offense count: 3
66
- Lint/ShadowingOuterLocalVariable:
67
- Exclude:
68
- - 'lib/oxidized/model/fortios.rb'
69
- - 'lib/oxidized/model/planet.rb'
70
-
71
- # Offense count: 7
72
- Lint/UnderscorePrefixedVariableName:
73
- Exclude:
74
- - 'lib/oxidized/input/cli.rb'
75
- - 'lib/oxidized/model/model.rb'
76
- - 'lib/oxidized/nodes.rb'
77
-
78
- # Offense count: 2
79
- # Cop supports --auto-correct.
80
- # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
81
- Lint/UnusedBlockArgument:
82
- Exclude:
83
- - 'lib/oxidized/hook/githubrepo.rb'
84
-
85
- # Offense count: 7
86
- # Cop supports --auto-correct.
87
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
88
- Lint/UnusedMethodArgument:
89
- Exclude:
90
- - 'lib/oxidized/core.rb'
91
- - 'lib/oxidized/hook.rb'
92
- - 'lib/oxidized/output/file.rb'
93
-
94
- # Offense count: 13
95
- Lint/UselessAssignment:
96
- Exclude:
97
- - 'lib/oxidized/model/cumulus.rb'
98
- - 'lib/oxidized/model/edgeos.rb'
99
- - 'lib/oxidized/model/gaiaos.rb'
100
- - 'lib/oxidized/model/mlnxos.rb'
101
- - 'lib/oxidized/model/openbsd.rb'
102
- - 'lib/oxidized/model/procurve.rb'
103
- - 'lib/oxidized/model/trango.rb'
104
- - 'lib/oxidized/model/voltaire.rb'
105
- - 'lib/oxidized/model/vyatta.rb'
106
- - 'lib/oxidized/model/zhoneolt.rb'
107
- - 'lib/oxidized/output/gitcrypt.rb'
108
- - 'lib/oxidized/output/http.rb'
109
- - 'lib/oxidized/source/csv.rb'
110
-
111
- # Offense count: 1
112
- # Configuration parameters: CheckForMethodsWithNoSideEffects.
113
- Lint/Void:
114
- Exclude:
115
- - 'lib/oxidized/model/voss.rb'
116
-
117
- # Offense count: 64
9
+ # Offense count: 67
118
10
  Metrics/AbcSize:
119
11
  Max: 84
120
12
 
121
13
  # Offense count: 19
122
14
  # Configuration parameters: CountComments, ExcludedMethods.
15
+ # ExcludedMethods: refine
123
16
  Metrics/BlockLength:
124
17
  Max: 142
125
18
 
126
- # Offense count: 2
127
- # Configuration parameters: CountBlocks.
128
- Metrics/BlockNesting:
129
- Max: 4
130
-
131
- # Offense count: 7
19
+ # Offense count: 6
132
20
  # Configuration parameters: CountComments.
133
21
  Metrics/ClassLength:
134
- Max: 210
22
+ Max: 196
135
23
 
136
- # Offense count: 14
24
+ # Offense count: 11
137
25
  Metrics/CyclomaticComplexity:
138
- Max: 28
26
+ Max: 13
139
27
 
140
- # Offense count: 55
141
- # Configuration parameters: CountComments.
28
+ # Offense count: 59
29
+ # Configuration parameters: CountComments, ExcludedMethods.
142
30
  Metrics/MethodLength:
143
- Max: 76
31
+ Max: 41
144
32
 
145
- # Offense count: 2
33
+ # Offense count: 1
146
34
  # Configuration parameters: CountKeywordArgs.
147
35
  Metrics/ParameterLists:
148
36
  Max: 6
149
37
 
150
- # Offense count: 15
38
+ # Offense count: 10
151
39
  Metrics/PerceivedComplexity:
152
- Max: 32
40
+ Max: 13
153
41
 
154
42
  # Offense count: 1
155
43
  Naming/AccessorMethodName:
156
44
  Exclude:
157
45
  - 'lib/oxidized/string.rb'
158
46
 
159
- # Offense count: 1
160
- Naming/ClassAndModuleCamelCase:
161
- Exclude:
162
- - 'lib/oxidized/model/apc_aos.rb'
163
-
164
47
  # Offense count: 8
165
48
  Naming/ConstantName:
166
49
  Exclude:
@@ -173,131 +56,17 @@ Naming/ConstantName:
173
56
  - 'lib/oxidized/input/telnet.rb'
174
57
 
175
58
  # Offense count: 1
59
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
60
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
176
61
  Naming/MemoizedInstanceVariableName:
177
62
  Exclude:
178
63
  - 'lib/oxidized/string.rb'
179
64
 
180
- # Offense count: 3
181
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
182
- # NamePrefix: is_, has_, have_
183
- # NamePrefixBlacklist: is_, has_, have_
184
- # NameWhitelist: is_a?
185
- # MethodDefinitionMacros: define_method, define_singleton_method
186
- Naming/PredicateName:
187
- Exclude:
188
- - 'spec/**/*'
189
- - 'lib/oxidized/node.rb'
190
- - 'lib/oxidized/worker.rb'
191
-
192
- # Offense count: 11
193
- # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
194
- # AllowedNames: io, id, to, by, on, in, at
195
- Naming/UncommunicativeMethodParamName:
196
- Exclude:
197
- - 'extra/syslog.rb'
198
- - 'lib/oxidized/input/cli.rb'
199
- - 'lib/oxidized/input/telnet.rb'
200
- - 'lib/oxidized/model/model.rb'
201
-
202
- # Offense count: 1
203
- # Cop supports --auto-correct.
204
- Performance/Casecmp:
205
- Exclude:
206
- - 'lib/oxidized/manager.rb'
207
-
208
- # Offense count: 1
209
- # Cop supports --auto-correct.
210
- Performance/InefficientHashSearch:
211
- Exclude:
212
- - 'lib/oxidized/node.rb'
213
-
214
- # Offense count: 57
215
- # Cop supports --auto-correct.
216
- Performance/RedundantMatch:
217
- Enabled: false
218
-
219
- # Offense count: 2
220
- # Cop supports --auto-correct.
221
- # Configuration parameters: MaxKeyValuePairs.
222
- Performance/RedundantMerge:
223
- Exclude:
224
- - 'lib/oxidized/hook/exec.rb'
225
- - 'lib/oxidized/input/telnet.rb'
226
-
227
- # Offense count: 6
228
- # Cop supports --auto-correct.
229
- Performance/StringReplacement:
230
- Exclude:
231
- - 'lib/oxidized/model/awplus.rb'
232
- - 'lib/oxidized/model/comware.rb'
233
- - 'lib/oxidized/model/sros.rb'
234
-
235
65
  # Offense count: 1
236
66
  Security/Eval:
237
67
  Exclude:
238
68
  - 'Rakefile'
239
69
 
240
- # Offense count: 1
241
- # Cop supports --auto-correct.
242
- # Configuration parameters: AutoCorrect.
243
- Security/JSONLoad:
244
- Exclude:
245
- - 'extra/nagios_check_failing_nodes.rb'
246
-
247
- # Offense count: 5
248
- Security/Open:
249
- Exclude:
250
- - 'extra/syslog.rb'
251
- - 'lib/oxidized/cli.rb'
252
- - 'lib/oxidized/node.rb'
253
- - 'lib/oxidized/output/file.rb'
254
- - 'lib/oxidized/source/csv.rb'
255
-
256
- # Offense count: 3
257
- # Cop supports --auto-correct.
258
- # Configuration parameters: EnforcedStyle.
259
- # SupportedStyles: prefer_alias, prefer_alias_method
260
- Style/Alias:
261
- Exclude:
262
- - 'lib/oxidized/node.rb'
263
- - 'lib/oxidized/nodes.rb'
264
-
265
- # Offense count: 47
266
- # Cop supports --auto-correct.
267
- # Configuration parameters: EnforcedStyle.
268
- # SupportedStyles: always, conditionals
269
- Style/AndOr:
270
- Enabled: false
271
-
272
- # Offense count: 3
273
- # Cop supports --auto-correct.
274
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
275
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
276
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
277
- # FunctionalMethods: let, let!, subject, watch
278
- # IgnoredMethods: lambda, proc, it
279
- Style/BlockDelimiters:
280
- Exclude:
281
- - 'lib/oxidized/model/aricentiss.rb'
282
- - 'lib/oxidized/model/hatteras.rb'
283
-
284
- # Offense count: 4
285
- # Cop supports --auto-correct.
286
- # Configuration parameters: EnforcedStyle.
287
- # SupportedStyles: braces, no_braces, context_dependent
288
- Style/BracesAroundHashParameters:
289
- Exclude:
290
- - 'lib/oxidized/hook/githubrepo.rb'
291
- - 'lib/oxidized/input/telnet.rb'
292
- - 'lib/oxidized/model/procurve.rb'
293
- - 'lib/oxidized/output/http.rb'
294
-
295
- # Offense count: 3
296
- Style/CaseEquality:
297
- Exclude:
298
- - 'lib/oxidized/input/telnet.rb'
299
- - 'lib/oxidized/model/model.rb'
300
-
301
70
  # Offense count: 4
302
71
  # Cop supports --auto-correct.
303
72
  # Configuration parameters: AutoCorrect, EnforcedStyle.
@@ -308,410 +77,20 @@ Style/ClassAndModuleChildren:
308
77
  - 'lib/oxidized/input/telnet.rb'
309
78
  - 'lib/oxidized/nodes.rb'
310
79
 
311
- # Offense count: 1
312
- # Cop supports --auto-correct.
313
- # Configuration parameters: EnforcedStyle.
314
- # SupportedStyles: is_a?, kind_of?
315
- Style/ClassCheck:
316
- Exclude:
317
- - 'lib/oxidized/input/telnet.rb'
318
-
319
80
  # Offense count: 2
320
81
  Style/ClassVars:
321
82
  Exclude:
322
83
  - 'lib/oxidized.rb'
323
84
 
324
- # Offense count: 4
325
- # Cop supports --auto-correct.
326
- Style/ColonMethodCall:
327
- Exclude:
328
- - 'lib/oxidized/input/ssh.rb'
329
- - 'lib/oxidized/input/telnet.rb'
330
-
331
- # Offense count: 1
332
- Style/CommentedKeyword:
333
- Exclude:
334
- - 'lib/oxidized/input/telnet.rb'
335
-
336
- # Offense count: 2
337
- # Cop supports --auto-correct.
338
- # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
339
- # SupportedStyles: assign_to_condition, assign_inside_condition
340
- Style/ConditionalAssignment:
341
- Exclude:
342
- - 'lib/oxidized/hook/githubrepo.rb'
343
- - 'lib/oxidized/model/model.rb'
344
-
345
- # Offense count: 153
346
- Style/Documentation:
347
- Enabled: false
348
-
349
85
  # Offense count: 2
350
86
  Style/DoubleNegation:
351
87
  Exclude:
352
88
  - 'lib/oxidized/cli.rb'
353
89
  - 'lib/oxidized/hook/exec.rb'
354
90
 
355
- # Offense count: 1
356
- # Cop supports --auto-correct.
357
- # Configuration parameters: EnforcedStyle.
358
- # SupportedStyles: compact, expanded
359
- Style/EmptyMethod:
360
- Exclude:
361
- - 'lib/oxidized/hook.rb'
362
-
363
- # Offense count: 1
364
- # Cop supports --auto-correct.
365
- Style/ExpandPathArguments:
366
- Exclude:
367
- - 'bin/console'
368
-
369
- # Offense count: 13
370
- # Configuration parameters: MinBodyLength.
371
- Style/GuardClause:
372
- Exclude:
373
- - 'lib/oxidized/cli.rb'
374
- - 'lib/oxidized/input/cli.rb'
375
- - 'lib/oxidized/jobs.rb'
376
- - 'lib/oxidized/nodes.rb'
377
- - 'lib/oxidized/output/file.rb'
378
- - 'lib/oxidized/output/git.rb'
379
- - 'lib/oxidized/output/gitcrypt.rb'
380
- - 'lib/oxidized/output/http.rb'
381
- - 'lib/oxidized/source/http.rb'
382
- - 'lib/oxidized/source/sql.rb'
383
- - 'lib/oxidized/string.rb'
384
-
385
- # Offense count: 97
386
- # Cop supports --auto-correct.
387
- # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
388
- # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
389
- Style/HashSyntax:
390
- Enabled: false
391
-
392
- # Offense count: 1
393
- Style/IfInsideElse:
394
- Exclude:
395
- - 'lib/oxidized/output/file.rb'
396
-
397
- # Offense count: 42
398
- # Cop supports --auto-correct.
399
- Style/IfUnlessModifier:
400
- Enabled: false
401
-
402
- # Offense count: 1
403
- Style/IfUnlessModifierOfIfUnless:
404
- Exclude:
405
- - 'lib/oxidized/input/ssh.rb'
406
-
407
- # Offense count: 2
408
- # Cop supports --auto-correct.
409
- Style/InfiniteLoop:
410
- Exclude:
411
- - 'extra/syslog.rb'
412
- - 'lib/oxidized/core.rb'
413
-
414
- # Offense count: 1
415
- # Cop supports --auto-correct.
416
- Style/LineEndConcatenation:
417
- Exclude:
418
- - 'lib/oxidized/hook.rb'
419
-
420
- # Offense count: 142
421
- # Cop supports --auto-correct.
422
- # Configuration parameters: EnforcedStyle.
423
- # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
424
- Style/MethodDefParentheses:
425
- Enabled: false
426
-
427
- # Offense count: 2
428
- # Cop supports --auto-correct.
429
- Style/MultilineIfThen:
430
- Exclude:
431
- - 'lib/oxidized/model/aricentiss.rb'
432
-
433
- # Offense count: 9
434
- # Cop supports --auto-correct.
435
- Style/MutableConstant:
436
- Exclude:
437
- - 'extra/syslog.rb'
438
- - 'lib/oxidized/hook.rb'
439
- - 'lib/oxidized/input/ftp.rb'
440
- - 'lib/oxidized/input/input.rb'
441
- - 'lib/oxidized/input/ssh.rb'
442
- - 'lib/oxidized/input/telnet.rb'
443
- - 'lib/oxidized/version.rb'
444
-
445
- # Offense count: 8
446
- # Cop supports --auto-correct.
447
- # Configuration parameters: EnforcedStyle.
448
- # SupportedStyles: both, prefix, postfix
449
- Style/NegatedIf:
450
- Exclude:
451
- - 'lib/oxidized/model/ios.rb'
452
- - 'lib/oxidized/node.rb'
453
- - 'lib/oxidized/output/git.rb'
454
- - 'lib/oxidized/output/gitcrypt.rb'
455
- - 'lib/oxidized/worker.rb'
456
-
457
- # Offense count: 2
458
- # Cop supports --auto-correct.
459
- # Configuration parameters: EnforcedStyle, MinBodyLength.
460
- # SupportedStyles: skip_modifier_ifs, always
461
- Style/Next:
462
- Exclude:
463
- - 'lib/oxidized/model/trango.rb'
464
- - 'lib/oxidized/output/git.rb'
465
-
466
- # Offense count: 1
467
- # Cop supports --auto-correct.
468
- Style/NilComparison:
469
- Exclude:
470
- - 'lib/oxidized/input/ssh.rb'
471
-
472
- # Offense count: 1
473
- # Cop supports --auto-correct.
474
- # Configuration parameters: EnforcedOctalStyle.
475
- # SupportedOctalStyles: zero_with_o, zero_only
476
- Style/NumericLiteralPrefix:
477
- Exclude:
478
- - 'lib/oxidized/output/git.rb'
479
-
480
- # Offense count: 6
481
- # Cop supports --auto-correct.
482
- # Configuration parameters: AutoCorrect, EnforcedStyle.
483
- # SupportedStyles: predicate, comparison
484
- Style/NumericPredicate:
485
- Exclude:
486
- - 'spec/**/*'
487
- - 'lib/oxidized/cli.rb'
488
- - 'lib/oxidized/core.rb'
489
- - 'lib/oxidized/jobs.rb'
490
- - 'lib/oxidized/nodes.rb'
491
- - 'lib/oxidized/worker.rb'
492
-
493
- # Offense count: 2
494
- # Cop supports --auto-correct.
495
- Style/OrAssignment:
496
- Exclude:
497
- - 'lib/oxidized/manager.rb'
498
-
499
- # Offense count: 5
500
- # Cop supports --auto-correct.
501
- Style/ParallelAssignment:
502
- Exclude:
503
- - 'extra/syslog.rb'
504
- - 'lib/oxidized/hook/exec.rb'
505
- - 'lib/oxidized/node.rb'
506
- - 'lib/oxidized/output/git.rb'
507
- - 'lib/oxidized/output/gitcrypt.rb'
508
-
509
- # Offense count: 4
510
- # Cop supports --auto-correct.
511
- # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
512
- Style/ParenthesesAroundCondition:
513
- Exclude:
514
- - 'lib/oxidized/model/ios.rb'
515
- - 'lib/oxidized/model/powerconnect.rb'
516
- - 'lib/oxidized/source/http.rb'
517
-
518
- # Offense count: 6
519
- # Cop supports --auto-correct.
520
- # Configuration parameters: PreferredDelimiters.
521
- Style/PercentLiteralDelimiters:
522
- Exclude:
523
- - 'lib/oxidized/config.rb'
524
- - 'lib/oxidized/input/ssh.rb'
525
-
526
- # Offense count: 22
527
- # Cop supports --auto-correct.
528
- Style/PerlBackrefs:
529
- Exclude:
530
- - 'lib/oxidized/model/acos.rb'
531
- - 'lib/oxidized/model/aos7.rb'
532
- - 'lib/oxidized/model/ios.rb'
533
- - 'lib/oxidized/model/junos.rb'
534
- - 'lib/oxidized/model/powerconnect.rb'
535
-
536
- # Offense count: 1
537
- # Cop supports --auto-correct.
538
- Style/Proc:
539
- Exclude:
540
- - 'lib/oxidized/hook/githubrepo.rb'
541
-
542
- # Offense count: 9
543
- # Cop supports --auto-correct.
544
- Style/RedundantBegin:
545
- Exclude:
546
- - 'lib/oxidized/input/telnet.rb'
547
- - 'lib/oxidized/output/git.rb'
548
- - 'lib/oxidized/output/gitcrypt.rb'
549
-
550
- # Offense count: 4
551
- # Cop supports --auto-correct.
552
- Style/RedundantParentheses:
553
- Exclude:
554
- - 'lib/oxidized/model/aricentiss.rb'
555
- - 'lib/oxidized/model/ios.rb'
556
- - 'lib/oxidized/model/powerconnect.rb'
557
-
558
- # Offense count: 2
559
- # Cop supports --auto-correct.
560
- # Configuration parameters: AllowMultipleReturnValues.
561
- Style/RedundantReturn:
562
- Exclude:
563
- - 'lib/oxidized/node.rb'
564
- - 'lib/oxidized/output/file.rb'
565
-
566
- # Offense count: 5
567
- # Cop supports --auto-correct.
568
- Style/RedundantSelf:
569
- Exclude:
570
- - 'lib/oxidized/hook.rb'
571
- - 'lib/oxidized/node.rb'
572
- - 'lib/oxidized/nodes.rb'
573
-
574
- # Offense count: 31
91
+ # Offense count: 34
575
92
  # Cop supports --auto-correct.
576
93
  # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
577
94
  # SupportedStyles: slashes, percent_r, mixed
578
95
  Style/RegexpLiteral:
579
96
  Enabled: false
580
-
581
- # Offense count: 19
582
- # Cop supports --auto-correct.
583
- # Configuration parameters: EnforcedStyle.
584
- # SupportedStyles: implicit, explicit
585
- Style/RescueStandardError:
586
- Exclude:
587
- - 'bin/oxidized'
588
- - 'extra/rest_client.rb'
589
- - 'extra/syslog.rb'
590
- - 'lib/oxidized/cli.rb'
591
- - 'lib/oxidized/config.rb'
592
- - 'lib/oxidized/hook.rb'
593
- - 'lib/oxidized/hook/exec.rb'
594
- - 'lib/oxidized/node.rb'
595
- - 'lib/oxidized/output/git.rb'
596
- - 'lib/oxidized/output/gitcrypt.rb'
597
- - 'lib/oxidized/worker.rb'
598
-
599
- # Offense count: 10
600
- # Cop supports --auto-correct.
601
- # Configuration parameters: AllowAsExpressionSeparator.
602
- Style/Semicolon:
603
- Exclude:
604
- - 'lib/oxidized/model/ios.rb'
605
- - 'lib/oxidized/output/git.rb'
606
- - 'lib/oxidized/output/gitcrypt.rb'
607
-
608
- # Offense count: 1
609
- # Cop supports --auto-correct.
610
- # Configuration parameters: EnforcedStyle.
611
- # SupportedStyles: use_perl_names, use_english_names
612
- Style/SpecialGlobalVars:
613
- Exclude:
614
- - 'lib/oxidized/cli.rb'
615
-
616
- # Offense count: 1
617
- Style/StructInheritance:
618
- Exclude:
619
- - 'lib/oxidized/hook.rb'
620
-
621
- # Offense count: 1
622
- # Cop supports --auto-correct.
623
- # Configuration parameters: MinSize.
624
- # SupportedStyles: percent, brackets
625
- Style/SymbolArray:
626
- EnforcedStyle: brackets
627
-
628
- # Offense count: 6
629
- # Cop supports --auto-correct.
630
- # Configuration parameters: IgnoredMethods.
631
- # IgnoredMethods: respond_to, define_method
632
- Style/SymbolProc:
633
- Exclude:
634
- - 'lib/oxidized/model/datacom.rb'
635
- - 'lib/oxidized/model/hpebladesystem.rb'
636
- - 'lib/oxidized/model/junos.rb'
637
- - 'lib/oxidized/model/outputs.rb'
638
- - 'lib/oxidized/nodes.rb'
639
-
640
- # Offense count: 3
641
- # Cop supports --auto-correct.
642
- # Configuration parameters: EnforcedStyleForMultiline.
643
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
644
- Style/TrailingCommaInArguments:
645
- Exclude:
646
- - 'lib/oxidized/hook/exec.rb'
647
- - 'lib/oxidized/output/git.rb'
648
-
649
- # Offense count: 4
650
- # Cop supports --auto-correct.
651
- # Configuration parameters: EnforcedStyleForMultiline.
652
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
653
- Style/TrailingCommaInArrayLiteral:
654
- Exclude:
655
- - 'lib/oxidized/input/input.rb'
656
- - 'lib/oxidized/input/ssh.rb'
657
-
658
- # Offense count: 11
659
- # Cop supports --auto-correct.
660
- # Configuration parameters: EnforcedStyleForMultiline.
661
- # SupportedStylesForMultiline: comma, consistent_comma, no_comma
662
- Style/TrailingCommaInHashLiteral:
663
- Exclude:
664
- - 'extra/syslog.rb'
665
- - 'lib/oxidized/config.rb'
666
- - 'lib/oxidized/input/ftp.rb'
667
- - 'lib/oxidized/input/input.rb'
668
- - 'lib/oxidized/input/ssh.rb'
669
- - 'lib/oxidized/node.rb'
670
- - 'lib/oxidized/node/stats.rb'
671
-
672
- # Offense count: 2
673
- # Cop supports --auto-correct.
674
- # Configuration parameters: AllowNamedUnderscoreVariables.
675
- Style/TrailingUnderscoreVariable:
676
- Exclude:
677
- - 'lib/oxidized/node.rb'
678
- - 'lib/oxidized/output/git.rb'
679
-
680
- # Offense count: 3
681
- # Cop supports --auto-correct.
682
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
683
- # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
684
- Style/TrivialAccessors:
685
- Exclude:
686
- - 'lib/oxidized/cli.rb'
687
- - 'lib/oxidized/input/ssh.rb'
688
- - 'lib/oxidized/model/model.rb'
689
-
690
- # Offense count: 2
691
- # Cop supports --auto-correct.
692
- Style/UnneededInterpolation:
693
- Exclude:
694
- - 'bin/oxidized'
695
- - 'lib/oxidized/cli.rb'
696
-
697
- # Offense count: 1
698
- # Cop supports --auto-correct.
699
- # Configuration parameters: WordRegex.
700
- # SupportedStyles: percent, brackets
701
- Style/WordArray:
702
- EnforcedStyle: percent
703
- MinSize: 3
704
-
705
- # Offense count: 3
706
- # Cop supports --auto-correct.
707
- Style/ZeroLengthPredicate:
708
- Exclude:
709
- - 'lib/oxidized/core.rb'
710
- - 'lib/oxidized/model/ciscosmb.rb'
711
- - 'lib/oxidized/output/git.rb'
712
-
713
- # Offense count: 306
714
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
715
- # URISchemes: http, https
716
- Metrics/LineLength:
717
- Max: 193