Commit c342c078 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'sh-fix-linter-registry-haml-try2' into 'master'

Fix uninitialized constant with HamlLint::LinterRegistry

Closes #62125

See merge request gitlab-org/gitlab-ce!28578
parents a6e2ec0d 27381e22
......@@ -7,7 +7,7 @@ exclude:
- 'vendor/**/*'
- 'spec/**/*'
require:
- './lib/haml_lint/linter/no_plain_nodes.rb'
- './haml_lint/linter/no_plain_nodes.rb'
linters:
AltText:
......
......@@ -7,7 +7,7 @@ unless Rails.env.production?
module HamlLint
class Linter::InlineJavaScript < Linter
include LinterRegistry
include ::HamlLint::LinterRegistry
def visit_filter(node)
return unless node.filter_type == 'javascript'
......
......@@ -5,7 +5,7 @@ require 'active_support/core_ext/array/grouping'
module HamlLint
class Linter
class NoPlainNodes < Linter
include LinterRegistry
include ::HamlLint::LinterRegistry
def visit_tag(node)
if inline_plain_node?(node)
......
unless Rails.env.production?
require 'haml_lint/rake_task'
require 'haml_lint/inline_javascript'
require Rails.root.join('haml_lint/inline_javascript')
# Workaround for warnings from parser/current
# Keep it even if it no longer emits any warnings,
......
......@@ -3,6 +3,7 @@
require 'spec_helper'
require 'haml_lint'
require 'haml_lint/spec'
require Rails.root.join('haml_lint/linter/no_plain_nodes')
describe HamlLint::Linter::NoPlainNodes do
include_context 'linter'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment