lib/textlint/plugin.rb in danger-textlint-1.2.1 vs lib/textlint/plugin.rb in danger-textlint-1.2.2
- old
+ new
@@ -39,10 +39,11 @@
# Execute textlint and send comment
# @return [void]
def lint
return if target_files.empty?
+
bin = textlint_path
result_json = run_textlint(bin, target_files)
errors = parse(result_json)
send_comment(errors)
end
@@ -56,9 +57,10 @@
# Same issue will occur 'message' when require 'mkmf'. Because 'mkmf' provide 'message' method.
# Then, disable find executable textlint until danger fix this issue.
# File.exist?(local) ? local : find_executable("textlint")
raise "textlint not found in ./node_modules/.bin/textlint" unless File.exist?(local)
+
local
end
def textlint_command(bin, target_files)
command = "#{bin} -f json"