danger-resharper_inspectcode 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33d5a2b7f828438589f15d266c6fdaec61347c54bf803ab12d303e05a8fb66ab
|
4
|
+
data.tar.gz: 19330918fe7973097d57fe0efd8467d70c8f9830545875dbe250e2084b9322b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9bfeb8bd426543d02ea17dfa0b8eb2aae16a0f73e123b2c8859828cbd8f0e76fbb08c711bbc7b554b4f900a31c37054cd8bc6d8967a5810bbd323d8bf851385
|
7
|
+
data.tar.gz: a38cc9a3cb36ec8142d29e1a66fb30281adc5b4a39f399a8cd6665ee242668365474f9663803dc39f5ce499bd98f0d9f82b5e1faae6d4826dc407e7d084ee278
|
@@ -19,13 +19,19 @@ module Danger
|
|
19
19
|
# @param file [String] File path of ReSharper InspectCode report file
|
20
20
|
def report(file)
|
21
21
|
raise "Please specify file name." if file.empty?
|
22
|
-
raise "No report file was found at #{file}" if File.exist?(file)
|
23
22
|
|
24
23
|
filepath = @base_path + (@base_path.end_with?("/") ? "" : "/") + file
|
24
|
+
raise "No report file was found at #{filepath}" unless File.exist?(filepath)
|
25
|
+
|
25
26
|
issues = ReportParser.parse_report_xml(filepath)
|
26
27
|
issues.each do |issue|
|
27
28
|
warn(issue.message, file: issue.file, line: issue.line)
|
28
29
|
end
|
29
30
|
end
|
31
|
+
|
32
|
+
def initialize(dangerfile)
|
33
|
+
super(dangerfile)
|
34
|
+
@base_path ||= Dir.pwd
|
35
|
+
end
|
30
36
|
end
|
31
37
|
end
|
@@ -40,6 +40,11 @@ module Danger
|
|
40
40
|
eq Violation.new("Nanyaine, is this!?", false, "Tsumugi/Nanyaine.cs", 1)
|
41
41
|
)
|
42
42
|
end
|
43
|
+
|
44
|
+
it "Throw Exception when report file not found" do
|
45
|
+
@my_plugin.base_path = "/hogehagefuga/"
|
46
|
+
expect { @my_plugin.report("hogedir/hogehoge.xml") }.to raise_error(Exception, /No report file was found at/)
|
47
|
+
end
|
43
48
|
end
|
44
49
|
end
|
45
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-resharper_inspectcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tumugin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|