danger-resharper_inspectcode 1.0.1 → 1.0.2
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 +4 -4
- data/Gemfile +3 -1
- data/Guardfile +4 -2
- data/Rakefile +12 -10
- data/lib/danger_plugin.rb +2 -0
- data/lib/danger_resharper_inspectcode.rb +2 -0
- data/lib/resharper_inspectcode/gem_version.rb +3 -1
- data/lib/resharper_inspectcode/plugin.rb +1 -0
- data/lib/resharper_inspectcode/report_parser.rb +1 -1
- data/spec/spec_helper.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3971a3c8ce66a8000e8b1af0bf4461bb550df19ec9b118502f2ada46e2ba9e0c
|
|
4
|
+
data.tar.gz: 4cb2b645c0b51e4efdf171863fbc6a3c5c883b95360611057a9a5b5ccee7aef6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 799b31781eb770b81b3691691fc9aab4d0b64cef50af0ed532797c76926084a93275253c68bb6dc37e023ac8ef6d1a66cc7ba8795fad7433c3239ce24e7e05d1
|
|
7
|
+
data.tar.gz: fa4a45f835e7822d2f45631da30acfdb03642db1a278c6849bc9e77390e1382a60e12cdb0c1c8121756aa0e9f8f8fcac9413adf4861eacb8cee60e9cdd815db3
|
data/Gemfile
CHANGED
data/Guardfile
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# A guardfile for making Danger Plugins
|
|
2
4
|
# For more info see https://github.com/guard/guard#readme
|
|
3
5
|
|
|
4
6
|
# To run, use `bundle exec guard`.
|
|
5
7
|
|
|
6
|
-
guard :rspec, cmd:
|
|
7
|
-
require
|
|
8
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
|
9
|
+
require "guard/rspec/dsl"
|
|
8
10
|
dsl = Guard::RSpec::Dsl.new(self)
|
|
9
11
|
|
|
10
12
|
# RSpec files
|
data/Rakefile
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "bundler/gem_tasks"
|
|
4
|
+
require "rspec/core/rake_task"
|
|
5
|
+
require "rubocop/rake_task"
|
|
4
6
|
|
|
5
7
|
RSpec::Core::RakeTask.new(:specs)
|
|
6
8
|
|
|
7
9
|
task default: :specs
|
|
8
10
|
|
|
9
11
|
task :spec do
|
|
10
|
-
Rake::Task[
|
|
11
|
-
Rake::Task[
|
|
12
|
-
Rake::Task[
|
|
12
|
+
Rake::Task["specs"].invoke
|
|
13
|
+
Rake::Task["rubocop"].invoke
|
|
14
|
+
Rake::Task["spec_docs"].invoke
|
|
13
15
|
end
|
|
14
16
|
|
|
15
|
-
desc
|
|
17
|
+
desc "Run RuboCop on the lib/specs directory"
|
|
16
18
|
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
17
|
-
task.patterns = [
|
|
19
|
+
task.patterns = ["lib/**/*.rb", "spec/**/*.rb"]
|
|
18
20
|
end
|
|
19
21
|
|
|
20
|
-
desc
|
|
22
|
+
desc "Ensure that the plugin passes `danger plugins lint`"
|
|
21
23
|
task :spec_docs do
|
|
22
|
-
sh
|
|
24
|
+
sh "bundle exec danger plugins lint"
|
|
23
25
|
end
|
data/lib/danger_plugin.rb
CHANGED
|
@@ -6,7 +6,7 @@ Issue = Struct.new(:file, :offset, :line, :message)
|
|
|
6
6
|
|
|
7
7
|
class ReportParser
|
|
8
8
|
def self.parse_report_xml(filepath)
|
|
9
|
-
xml_file = open(filepath)
|
|
9
|
+
xml_file = File.open(filepath)
|
|
10
10
|
document = Oga.parse_xml(xml_file)
|
|
11
11
|
issues = []
|
|
12
12
|
document.xpath("//Report/Issues/Project").each do |project|
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require "pathname"
|
|
2
|
-
ROOT = Pathname.new(File.expand_path("
|
|
4
|
+
ROOT = Pathname.new(File.expand_path("..", __dir__))
|
|
3
5
|
$:.unshift((ROOT + "lib").to_s)
|
|
4
6
|
$:.unshift((ROOT + "spec").to_s)
|
|
5
7
|
|
|
@@ -9,7 +11,7 @@ require "pry"
|
|
|
9
11
|
require "rspec"
|
|
10
12
|
require "danger"
|
|
11
13
|
|
|
12
|
-
if `git remote -v` ==
|
|
14
|
+
if `git remote -v` == ""
|
|
13
15
|
puts "You cannot run tests without setting a local git remote on this repo"
|
|
14
16
|
puts "It's a weird side-effect of Danger's internals."
|
|
15
17
|
exit(0)
|