2016-09-12 13:36:24 -04:00
|
|
|
unless Rails.env.production?
|
|
|
|
require 'haml_lint/rake_task'
|
2017-03-06 14:46:52 -05:00
|
|
|
require 'haml_lint/inline_javascript'
|
2016-09-12 13:36:24 -04:00
|
|
|
|
2018-01-23 14:19:45 -05:00
|
|
|
# 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
|
|
|
|
|
2016-09-13 12:56:00 -04:00
|
|
|
HamlLint::RakeTask.new
|
2016-09-12 13:36:24 -04:00
|
|
|
end
|