codeclimate 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/prep-release +4 -2
- data/config/engines.yml +7 -1
- data/lib/cc/analyzer.rb +1 -1
- data/lib/cc/analyzer/{engines_builder.rb → engines_config_builder.rb} +13 -11
- data/lib/cc/analyzer/engines_runner.rb +16 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d13448b3cac119e109b7c8803f6a9ad3d40c7cfc
|
4
|
+
data.tar.gz: ca2b0a4d9ce066010654c5c4b33f648e671c80f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af40f37bcad31b287e4e89cd903a327381c435d9925343aff88a05d3c15816e4f99a4c8cceb2de1f635bedbfc11544375fbabf662436473eb818069d3a6e43e1
|
7
|
+
data.tar.gz: 0ebed34277ebffadb88133ffc92a61ec07c14f732ae3c67bb9d6e496cdf40590d40219d53d8f2c919cc4d5d79315b2110d7abf69bc2ed529e742936959698174
|
data/bin/prep-release
CHANGED
@@ -33,10 +33,12 @@ git add VERSION Gemfile.lock
|
|
33
33
|
git commit -m "Release v$version"
|
34
34
|
git push origin $branch
|
35
35
|
|
36
|
-
if command -v
|
36
|
+
if command -v hub > /dev/null 2>&1; then
|
37
|
+
hub pull-request -m "Release v$version"
|
38
|
+
elif command -v gh > /dev/null 2>&1; then
|
37
39
|
gh pull-request -m "Release v$version"
|
38
40
|
else
|
39
|
-
echo "
|
41
|
+
echo "hub not installed? Please open the PR manually" >&2
|
40
42
|
fi
|
41
43
|
|
42
44
|
echo "After merging the version-bump PR, run bin/release"
|
data/config/engines.yml
CHANGED
@@ -105,6 +105,12 @@ foodcritic:
|
|
105
105
|
community: true
|
106
106
|
enable_regexps:
|
107
107
|
default_ratings_paths:
|
108
|
+
nodesecurity:
|
109
|
+
image: codeclimate/codeclimate-nodesecurity
|
110
|
+
description: Security tool for Node.js dependencies.
|
111
|
+
community: true
|
112
|
+
enable_regexps:
|
113
|
+
default_ratings_paths:
|
108
114
|
pep8:
|
109
115
|
image: codeclimate/codeclimate-pep8
|
110
116
|
description: Static analysis tool to check Python code against the style conventions outlined in PEP-8.
|
@@ -150,7 +156,7 @@ radon:
|
|
150
156
|
default_ratings_paths:
|
151
157
|
- "**.py"
|
152
158
|
requiresafe:
|
153
|
-
image: codeclimate/codeclimate-
|
159
|
+
image: codeclimate/codeclimate-nodesecurity
|
154
160
|
description: Security tool for Node.js dependencies.
|
155
161
|
community: true
|
156
162
|
enable_regexps:
|
data/lib/cc/analyzer.rb
CHANGED
@@ -7,7 +7,7 @@ module CC
|
|
7
7
|
autoload :Engine, "cc/analyzer/engine"
|
8
8
|
autoload :EngineOutputFilter, "cc/analyzer/engine_output_filter"
|
9
9
|
autoload :EngineRegistry, "cc/analyzer/engine_registry"
|
10
|
-
autoload :
|
10
|
+
autoload :EnginesConfigBuilder, "cc/analyzer/engines_config_builder"
|
11
11
|
autoload :EnginesRunner, "cc/analyzer/engines_runner"
|
12
12
|
autoload :Filesystem, "cc/analyzer/filesystem"
|
13
13
|
autoload :Formatters, "cc/analyzer/formatters"
|
@@ -2,7 +2,15 @@ require "securerandom"
|
|
2
2
|
|
3
3
|
module CC
|
4
4
|
module Analyzer
|
5
|
-
class
|
5
|
+
class EnginesConfigBuilder
|
6
|
+
Result = Struct.new(
|
7
|
+
:name,
|
8
|
+
:registry_entry,
|
9
|
+
:code_path,
|
10
|
+
:config,
|
11
|
+
:container_label,
|
12
|
+
)
|
13
|
+
|
6
14
|
def initialize(registry:, config:, container_label:, source_dir:, requested_paths:)
|
7
15
|
@registry = registry
|
8
16
|
@config = config
|
@@ -11,22 +19,16 @@ module CC
|
|
11
19
|
@source_dir = source_dir
|
12
20
|
end
|
13
21
|
|
14
|
-
def run
|
22
|
+
def run
|
15
23
|
names_and_raw_engine_configs.map do |name, raw_engine_config|
|
16
|
-
|
24
|
+
label = @container_label || SecureRandom.uuid
|
25
|
+
engine_config = engine_config(raw_engine_config)
|
26
|
+
Result.new(name, @registry[name], @source_dir, engine_config, label)
|
17
27
|
end
|
18
28
|
end
|
19
29
|
|
20
30
|
private
|
21
31
|
|
22
|
-
def build_engine(engine_class, name, raw_engine_config)
|
23
|
-
label = @container_label || SecureRandom.uuid
|
24
|
-
engine_config = engine_config(raw_engine_config)
|
25
|
-
engine_class.new(
|
26
|
-
name, @registry[name], @source_dir, engine_config, label
|
27
|
-
)
|
28
|
-
end
|
29
|
-
|
30
32
|
def engine_config(raw_engine_config)
|
31
33
|
config = raw_engine_config.merge(
|
32
34
|
exclude_paths: exclude_paths,
|
@@ -31,8 +31,18 @@ module CC
|
|
31
31
|
|
32
32
|
attr_reader :requested_paths
|
33
33
|
|
34
|
-
def
|
35
|
-
|
34
|
+
def build_engine(built_config)
|
35
|
+
Engine.new(
|
36
|
+
built_config.name,
|
37
|
+
built_config.registry_entry,
|
38
|
+
built_config.code_path,
|
39
|
+
built_config.config,
|
40
|
+
built_config.container_label,
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
44
|
+
def configs
|
45
|
+
EnginesConfigBuilder.new(
|
36
46
|
registry: @registry,
|
37
47
|
config: @config,
|
38
48
|
container_label: @container_label,
|
@@ -41,6 +51,10 @@ module CC
|
|
41
51
|
).run
|
42
52
|
end
|
43
53
|
|
54
|
+
def engines
|
55
|
+
@engines ||= configs.map { |result| build_engine(result) }
|
56
|
+
end
|
57
|
+
|
44
58
|
def run_engine(engine, container_listener)
|
45
59
|
@formatter.engine_running(engine) do
|
46
60
|
engine.run(@formatter, container_listener)
|
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.14.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: 2015-11-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -205,7 +205,7 @@ files:
|
|
205
205
|
- lib/cc/analyzer/engine.rb
|
206
206
|
- lib/cc/analyzer/engine_output_filter.rb
|
207
207
|
- lib/cc/analyzer/engine_registry.rb
|
208
|
-
- lib/cc/analyzer/
|
208
|
+
- lib/cc/analyzer/engines_config_builder.rb
|
209
209
|
- lib/cc/analyzer/engines_runner.rb
|
210
210
|
- lib/cc/analyzer/filesystem.rb
|
211
211
|
- lib/cc/analyzer/formatters.rb
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
version: '0'
|
262
262
|
requirements: []
|
263
263
|
rubyforge_project:
|
264
|
-
rubygems_version: 2.4.
|
264
|
+
rubygems_version: 2.4.8
|
265
265
|
signing_key:
|
266
266
|
specification_version: 4
|
267
267
|
summary: Code Climate CLI
|