Convert parser warnings to stdout in haml_lint
So we ignore it in static-analysis when status is 0, yet still report it if it's not.
This commit is contained in:
parent
b0b6abde10
commit
cb7974b8f7
1 changed files with 9 additions and 0 deletions
|
@ -2,5 +2,14 @@ unless Rails.env.production?
|
||||||
require 'haml_lint/rake_task'
|
require 'haml_lint/rake_task'
|
||||||
require 'haml_lint/inline_javascript'
|
require 'haml_lint/inline_javascript'
|
||||||
|
|
||||||
|
# Workaround for warnings from parser/current
|
||||||
|
# TODO: Remove this after we update parser gem
|
||||||
|
task :haml_lint do
|
||||||
|
require 'parser'
|
||||||
|
def Parser.warn(*args)
|
||||||
|
puts(*args) # static-analysis ignores stdout if status is 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
HamlLint::RakeTask.new
|
HamlLint::RakeTask.new
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue