danger-resharper_inspectcode 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfa37447f7493ff33aeda9d52528706ced6d759d810651cfb12a83dd51743a0e
4
- data.tar.gz: 6b535695212a4ae430268ca13f037aee28e51e67221edd5bc4152b1906361bdc
3
+ metadata.gz: 33d5a2b7f828438589f15d266c6fdaec61347c54bf803ab12d303e05a8fb66ab
4
+ data.tar.gz: 19330918fe7973097d57fe0efd8467d70c8f9830545875dbe250e2084b9322b2
5
5
  SHA512:
6
- metadata.gz: '08bc2c8c9e4806768b9f8fbfc5f2d5129d01492f320f5877c449f2be04e0073de7631a94795f4329c9104270e6759bb17c44dda48399b19b148d76cda2596265'
7
- data.tar.gz: da1a18edca47a604a1d85f3c1548140d7ffc77662e5fc7bc8436ec5d215fd018ccbc902936a4e3960b8b0757a19e6f937d3a1e60f89be694b9fb9487b85643af
6
+ metadata.gz: b9bfeb8bd426543d02ea17dfa0b8eb2aae16a0f73e123b2c8859828cbd8f0e76fbb08c711bbc7b554b4f900a31c37054cd8bc6d8967a5810bbd323d8bf851385
7
+ data.tar.gz: a38cc9a3cb36ec8142d29e1a66fb30281adc5b4a39f399a8cd6665ee242668365474f9663803dc39f5ce499bd98f0d9f82b5e1faae6d4826dc407e7d084ee278
@@ -1,3 +1,3 @@
1
1
  module ResharperInspectcode
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.0.1".freeze
3
3
  end
@@ -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.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-10-27 00:00:00.000000000 Z
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