codeclimate 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/analyzer/engines_runner.rb +14 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dbff022149c78ea083976a0acf56e1da6d5b1d8
|
4
|
+
data.tar.gz: 2d6297f56bf20b11b0159cb661f4123841a600e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3f1a4161715e07abde090de18b58b219d9a538440b5fc59482d225c8a221d6c4ac8204a1771407f7588d4e82cdc7d3a4cb13123369aabc39b1ee99a4db367d6
|
7
|
+
data.tar.gz: ecd82f39eaabca068d9793158b6d060d7a364e382bf851e41bd3b2d8f4a1b2b3ce2f0c8d26791aad65d6bce2e9b429118af75fd84ff6f1c45ce3efe0ea7b14b7
|
@@ -48,12 +48,24 @@ module CC
|
|
48
48
|
@engines ||= enabled_engines.map do |name, config|
|
49
49
|
metadata = registry_lookup(name)
|
50
50
|
label = @container_label || SecureRandom.uuid
|
51
|
-
engine_config = config.merge!(exclude_paths: exclude_paths)
|
52
51
|
|
53
|
-
Engine.new(name, metadata, @source_dir, engine_config, label)
|
52
|
+
Engine.new(name, metadata, @source_dir, engine_config(config), label)
|
54
53
|
end
|
55
54
|
end
|
56
55
|
|
56
|
+
def engine_config(config)
|
57
|
+
config = config.merge(exclude_paths: exclude_paths)
|
58
|
+
|
59
|
+
# The yaml gem turns a config file string into a hash, but engines expect the string
|
60
|
+
# So we (for now) need to turn it into a string in that one scenario.
|
61
|
+
# TODO: update the engines to expect the hash and then remove this.
|
62
|
+
if config.fetch("config", {}).keys.size == 1 && config["config"].key?("file")
|
63
|
+
config["config"] = config["config"]["file"]
|
64
|
+
end
|
65
|
+
|
66
|
+
config
|
67
|
+
end
|
68
|
+
|
57
69
|
def enabled_engines
|
58
70
|
{}.tap do |ret|
|
59
71
|
@config.engines.each do |name, config|
|