lib/reek/plugin.rb in danger-reek-0.1.0 vs lib/reek/plugin.rb in danger-reek-0.1.1
- old
+ new
@@ -1,6 +1,8 @@
require 'reek'
+require 'reek/cli/options'
+require 'reek/source/source_locator'
module Danger
# Lints Ruby files via [Reek](https://rubygems.org/gems/reek).
# Results are sent as inline comments.
#
@@ -29,10 +31,10 @@
end
end
def fetch_files_to_lint
files = git.modified_files + git.added_files
- Array(files.map { |file| Pathname(file) })
+ ::Reek::Source::SourceLocator.new(files).sources
end
def warn_each_line(code_smells)
code_smells.each do |smell|
message = smell.message.capitalize