codeclimate 0.87.5 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/engines.yml +8 -0
- data/lib/cc/analyzer/statsd_container_listener.rb +16 -13
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2136e43d5fa42ad6d159f140cd1acc59f61b5962200bdcb5625285b7decc665
|
4
|
+
data.tar.gz: 6a9fc985b270c738ca958db42f710e0747bdf1ecfdcfb4c701d36fc425b10cfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42402e02b05875363b3360ea954fbcf59aa815e46c6aa31f8db1084ddd47e9f910e170547e6a56c5772553f55667bb8987d7868b8713fece8ddaf16599ec4b3f
|
7
|
+
data.tar.gz: f79ca2893f0945b6d625cd79eeb7c9c9c62d5773c9677261b3148c8847f9ff922491495f8858f81b37e89b1a7ec11a6d7181b6c8a64c077f3e13dc7ad2af0ebb
|
data/config/engines.yml
CHANGED
@@ -10,6 +10,8 @@ apexmetrics:
|
|
10
10
|
bandit:
|
11
11
|
channels:
|
12
12
|
stable: codeclimate/codeclimate-bandit
|
13
|
+
beta: codeclimate/codeclimate-bandit:beta
|
14
|
+
bandit-1-7-4: codeclimate/codeclimate-bandit:bandit-1-7-4
|
13
15
|
description: A tool designed to find common security issues in Python code.
|
14
16
|
black:
|
15
17
|
channels:
|
@@ -144,6 +146,8 @@ luacheck:
|
|
144
146
|
markdownlint:
|
145
147
|
channels:
|
146
148
|
stable: codeclimate/codeclimate-markdownlint
|
149
|
+
beta: codeclimate/codeclimate-markdownlint:beta
|
150
|
+
markdownlint-0-12-0: codeclimate/codeclimate-markdownlint:markdownlint-0-12-0
|
147
151
|
description: Flags style issues within Markdown files.
|
148
152
|
nodesecurity:
|
149
153
|
channels:
|
@@ -259,6 +263,7 @@ rubocop:
|
|
259
263
|
rubocop-1-23-0: codeclimate/codeclimate-rubocop:rubocop-1-23-0
|
260
264
|
rubocop-1-30-0: codeclimate/codeclimate-rubocop:rubocop-1-30-0
|
261
265
|
rubocop-1-31-0: codeclimate/codeclimate-rubocop:rubocop-1-31-0
|
266
|
+
rubocop-1-39-0: codeclimate/codeclimate-rubocop:rubocop-1-39-0
|
262
267
|
description: A Ruby static code analyzer, based on the community Ruby style guide.
|
263
268
|
rubymotion:
|
264
269
|
channels:
|
@@ -285,6 +290,8 @@ semgrep:
|
|
285
290
|
shellcheck:
|
286
291
|
channels:
|
287
292
|
stable: codeclimate/codeclimate-shellcheck
|
293
|
+
beta: codeclimate/codeclimate-shellcheck:beta
|
294
|
+
shellcheck-0-9-0: codeclimate/codeclimate-shellcheck:shellcheck-0-9-0
|
288
295
|
description: A static analysis tool for shell scripts.
|
289
296
|
sonar-java:
|
290
297
|
channels:
|
@@ -316,6 +323,7 @@ stylelint:
|
|
316
323
|
channels:
|
317
324
|
beta: codeclimate/codeclimate-stylelint:beta
|
318
325
|
stable: codeclimate/codeclimate-stylelint
|
326
|
+
stylelint-14-15-0: codeclimate/codeclimate-stylelint:stylelint-14-15-0
|
319
327
|
description: A mighty, modern CSS linter.
|
320
328
|
swiftlint:
|
321
329
|
channels:
|
@@ -1,9 +1,12 @@
|
|
1
1
|
module CC
|
2
2
|
module Analyzer
|
3
3
|
class StatsdContainerListener < ContainerListener
|
4
|
-
|
4
|
+
# rubocop:disable Lint/MissingSuper
|
5
|
+
def initialize(statsd, repo_id: nil)
|
5
6
|
@statsd = statsd
|
7
|
+
@repo_id = repo_id
|
6
8
|
end
|
9
|
+
# rubocop:enable Lint/MissingSuper
|
7
10
|
|
8
11
|
def started(engine, _details)
|
9
12
|
increment(engine, "started")
|
@@ -29,34 +32,34 @@ module CC
|
|
29
32
|
|
30
33
|
private
|
31
34
|
|
32
|
-
attr_reader :statsd
|
35
|
+
attr_reader :statsd, :repo_id
|
33
36
|
|
34
|
-
def increment(engine,
|
37
|
+
def increment(engine, action)
|
35
38
|
tags = engine_tags(engine)
|
39
|
+
metric = metric_name(action)
|
40
|
+
|
36
41
|
# rubocop:disable Style/HashSyntax
|
37
|
-
|
42
|
+
statsd.increment(metric, tags: tags)
|
38
43
|
# rubocop:enable Style/HashSyntax
|
39
44
|
end
|
40
45
|
|
41
|
-
def timing(engine,
|
46
|
+
def timing(engine, action, millis)
|
42
47
|
tags = engine_tags(engine)
|
48
|
+
metric = metric_name(action)
|
49
|
+
|
43
50
|
# rubocop:disable Style/HashSyntax
|
44
|
-
|
51
|
+
statsd.timing(metric, millis, tags: tags)
|
45
52
|
# rubocop:enable Style/HashSyntax
|
46
53
|
end
|
47
54
|
|
48
|
-
def
|
49
|
-
|
50
|
-
"engines.#{metric_name}",
|
51
|
-
"engines.names.#{engine.name}.#{metric_name}",
|
52
|
-
].tap do |metrics|
|
53
|
-
metrics << "engines.names.#{engine.name}.#{engine.channel}.#{metric_name}" if engine_channel_present?(engine)
|
54
|
-
end
|
55
|
+
def metric_name(action)
|
56
|
+
"engines.#{action}"
|
55
57
|
end
|
56
58
|
|
57
59
|
def engine_tags(engine)
|
58
60
|
["engine:#{engine.name}"].tap do |tags|
|
59
61
|
tags << "channel:#{engine.channel}" if engine_channel_present?(engine)
|
62
|
+
tags << "repo_id:#{repo_id}" if repo_id.present?
|
60
63
|
end
|
61
64
|
end
|
62
65
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.89.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -235,7 +235,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
235
235
|
version: '2.6'
|
236
236
|
- - "<="
|
237
237
|
- !ruby/object:Gem::Version
|
238
|
-
version: 3.1.
|
238
|
+
version: 3.1.3
|
239
239
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - ">="
|