codeclimate 0.36.0 → 0.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/engines.yml +14 -0
- data/lib/cc/analyzer/formatters/formatter.rb +12 -1
- data/lib/cc/analyzer/formatters/html_formatter.rb +0 -14
- data/lib/cc/analyzer/formatters/plain_text_formatter.rb +0 -14
- data/lib/cc/analyzer/issue_validations/content_validation.rb +0 -4
- data/lib/cc/analyzer/issue_validations/path_existence_validation.rb +1 -7
- data/lib/cc/analyzer/issue_validations/path_is_file_validation.rb +1 -7
- data/lib/cc/analyzer/issue_validations/path_presence_validation.rb +0 -6
- data/lib/cc/analyzer/issue_validations/relative_path_validation.rb +0 -4
- data/lib/cc/analyzer/issue_validations/type_validation.rb +0 -6
- data/lib/cc/analyzer/issue_validations/validation.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1c7d46430efa8e5178df3c41f8c57e563bc72b9
|
4
|
+
data.tar.gz: d22c7d49422fed9d3fe564c9731d96e780a3a0b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee00fc6546557ba7a8fa6379098c48655568363d4bc06d6f16f129c36101096ee198678bae3114a0300eb1d8d2fa005f9e0fe2e14e2864f4dda51b1c0b40c4ab
|
7
|
+
data.tar.gz: 50344aa2d1c7f4c76a963f679310043311eecad6edbe9d9e5fd24e1fb019632bd114cb855899dd059bb58cc804200f257cd0739baab70c0afc738007e39d5a28
|
data/config/engines.yml
CHANGED
@@ -59,8 +59,22 @@ coffeelint:
|
|
59
59
|
- \.coffee$
|
60
60
|
default_ratings_paths:
|
61
61
|
- "**.coffee"
|
62
|
+
credo:
|
63
|
+
channels:
|
64
|
+
beta: codeclimate/codeclimate-credo:beta
|
65
|
+
description: >
|
66
|
+
A static code analysis tool for the Elixir language with a focus on code
|
67
|
+
consistency and teaching.
|
68
|
+
community: true
|
69
|
+
enable_regexps:
|
70
|
+
- \.ex$
|
71
|
+
- \.exs$
|
72
|
+
default_ratings_paths:
|
73
|
+
- "**.ex"
|
74
|
+
- "**.exs"
|
62
75
|
duplication:
|
63
76
|
channels:
|
77
|
+
beta: codeclimate/codeclimate-duplication:beta
|
64
78
|
stable: codeclimate/codeclimate-duplication
|
65
79
|
description: Structural duplication detection for Ruby, Python, JavaScript, and PHP.
|
66
80
|
community: false
|
@@ -7,7 +7,18 @@ module CC
|
|
7
7
|
@output = output
|
8
8
|
end
|
9
9
|
|
10
|
-
def write(
|
10
|
+
def write(data)
|
11
|
+
json = JSON.parse(data)
|
12
|
+
json["engine_name"] = current_engine.name
|
13
|
+
|
14
|
+
case json["type"].downcase
|
15
|
+
when "issue"
|
16
|
+
issues << json
|
17
|
+
when "warning"
|
18
|
+
warnings << json
|
19
|
+
else
|
20
|
+
raise "Invalid type found: #{json["type"]}"
|
21
|
+
end
|
11
22
|
end
|
12
23
|
|
13
24
|
def started
|
@@ -26,20 +26,6 @@ module CC
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def write(data)
|
30
|
-
json = JSON.parse(data)
|
31
|
-
json["engine_name"] = current_engine.name
|
32
|
-
|
33
|
-
case json["type"].downcase
|
34
|
-
when "issue"
|
35
|
-
issues << json
|
36
|
-
when "warning"
|
37
|
-
warnings << json
|
38
|
-
else
|
39
|
-
raise "Invalid type found: #{json["type"]}"
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
29
|
def finished
|
44
30
|
template = ReportTemplate.new(issues.length, issues_by_path)
|
45
31
|
puts template.render
|
@@ -10,20 +10,6 @@ module CC
|
|
10
10
|
puts colorize("Starting analysis", :green)
|
11
11
|
end
|
12
12
|
|
13
|
-
def write(data)
|
14
|
-
json = JSON.parse(data)
|
15
|
-
json["engine_name"] = current_engine.name
|
16
|
-
|
17
|
-
case json["type"].downcase
|
18
|
-
when "issue"
|
19
|
-
issues << json
|
20
|
-
when "warning"
|
21
|
-
warnings << json
|
22
|
-
else
|
23
|
-
raise "Invalid type found: #{json["type"]}"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
13
|
def finished
|
28
14
|
puts
|
29
15
|
|
@@ -3,18 +3,12 @@ module CC
|
|
3
3
|
module IssueValidations
|
4
4
|
class PathExistenceValidation < Validation
|
5
5
|
def valid?
|
6
|
-
File.exist?(path)
|
6
|
+
path && File.exist?(path)
|
7
7
|
end
|
8
8
|
|
9
9
|
def message
|
10
10
|
"File does not exist: '#{path}'"
|
11
11
|
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def path
|
16
|
-
object.fetch("location", {}).fetch("path", "")
|
17
|
-
end
|
18
12
|
end
|
19
13
|
end
|
20
14
|
end
|
@@ -3,18 +3,12 @@ module CC
|
|
3
3
|
module IssueValidations
|
4
4
|
class PathIsFileValidation < Validation
|
5
5
|
def valid?
|
6
|
-
File.file?(path)
|
6
|
+
path && File.file?(path)
|
7
7
|
end
|
8
8
|
|
9
9
|
def message
|
10
10
|
"Path is not a file: '#{path}'"
|
11
11
|
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def path
|
16
|
-
object.fetch("location", {}).fetch("path", "")
|
17
|
-
end
|
18
12
|
end
|
19
13
|
end
|
20
14
|
end
|
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.37.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: 2016-
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -251,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
251
|
version: '0'
|
252
252
|
requirements: []
|
253
253
|
rubyforge_project:
|
254
|
-
rubygems_version: 2.
|
254
|
+
rubygems_version: 2.5.1
|
255
255
|
signing_key:
|
256
256
|
specification_version: 4
|
257
257
|
summary: Code Climate CLI
|