2019-02-15 15:39:39 +05:30
|
|
|
unless Rails.env.production?
|
|
|
|
require 'haml_lint/rake_task'
|
2019-09-04 21:01:54 +05:30
|
|
|
require Rails.root.join('haml_lint/inline_javascript')
|
2019-02-15 15:39:39 +05:30
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
HamlLint::RakeTask.new
|
|
|
|
end
|