2016-09-12 13:36:24 -04:00
|
|
|
unless Rails.env.production?
|
|
|
|
require 'haml_lint/rake_task'
|
2019-05-21 22:49:14 -04:00
|
|
|
require Rails.root.join('haml_lint/inline_javascript')
|
2016-09-12 13:36:24 -04:00
|
|
|
|
2018-10-24 03:29:03 -04:00
|
|
|
# Workaround for warnings from parser/current
|
|
|
|
# Keep it even if it no longer emits any warnings,
|
|
|
|
# because we'll still see warnings in console/server anyway,
|
|
|
|
# and we don't need to break static-analysis for this.
|
|
|
|
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
|