lib/ormolu/plugin.rb in danger-ormolu-0.0.3 vs lib/ormolu/plugin.rb in danger-ormolu-0.0.4
- old
+ new
@@ -13,13 +13,13 @@
class DangerOrmolu < Plugin
# Check that the files are correctly formatted
# @param files [Array<String>]
# @return [void]
#
- def check(files, path: 'ormolu', level: :warn)
+ def check(files, path: 'ormolu', args: '', level: :warn)
files
.each do |file|
- result = `#{path} --mode stdout --check-idempotence "#{file}" | diff "#{file}" -`
+ result = `#{path} #{args} --mode stdout --check-idempotence "#{file}" | diff "#{file}" -`
next if result.empty?
extract_diffs(result.lines)
.each do |diff|
inconsistence(file, diff[:line], diff[:diff], level)