summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-05-21 19:49:14 -0700
committerStan Hu <stanhu@gmail.com>2019-05-21 19:49:14 -0700
commit27381e22a92453b23f1ed75406970b37d926f1ec (patch)
treebdb46c358c8028493f3e69d8adb2cdaaf2f766fe
parent0ded86570c10d24ad4fff7e4fcd4b562bcd397fd (diff)
downloadgitlab-ce-sh-fix-linter-registry-haml.tar.gz
Move files from lib/haml_lint to haml_lintsh-fix-linter-registry-haml
Files in lib will be eager loaded and hence will require haml_lint to be loaded. Since this is only a development dependency, we can't assume this gem will be available in production, so it should never be loaded in production.
-rw-r--r--.haml-lint.yml2
-rw-r--r--haml_lint/inline_javascript.rb (renamed from lib/haml_lint/inline_javascript.rb)0
-rw-r--r--haml_lint/linter/no_plain_nodes.rb (renamed from lib/haml_lint/linter/no_plain_nodes.rb)0
-rw-r--r--lib/tasks/haml-lint.rake2
-rw-r--r--spec/haml_lint/linter/no_plain_nodes_spec.rb (renamed from spec/lib/haml_lint/linter/no_plain_nodes_spec.rb)1
5 files changed, 3 insertions, 2 deletions
diff --git a/.haml-lint.yml b/.haml-lint.yml
index 9f3676fa080..0412b24a48c 100644
--- a/.haml-lint.yml
+++ b/.haml-lint.yml
@@ -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:
diff --git a/lib/haml_lint/inline_javascript.rb b/haml_lint/inline_javascript.rb
index da6af92e82b..da6af92e82b 100644
--- a/lib/haml_lint/inline_javascript.rb
+++ b/haml_lint/inline_javascript.rb
diff --git a/lib/haml_lint/linter/no_plain_nodes.rb b/haml_lint/linter/no_plain_nodes.rb
index c39f61fa80d..c39f61fa80d 100644
--- a/lib/haml_lint/linter/no_plain_nodes.rb
+++ b/haml_lint/linter/no_plain_nodes.rb
diff --git a/lib/tasks/haml-lint.rake b/lib/tasks/haml-lint.rake
index 786efd14b1a..305e15d69d5 100644
--- a/lib/tasks/haml-lint.rake
+++ b/lib/tasks/haml-lint.rake
@@ -1,6 +1,6 @@
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,
diff --git a/spec/lib/haml_lint/linter/no_plain_nodes_spec.rb b/spec/haml_lint/linter/no_plain_nodes_spec.rb
index 99cc9b9bc8d..08deb5a4e9e 100644
--- a/spec/lib/haml_lint/linter/no_plain_nodes_spec.rb
+++ b/spec/haml_lint/linter/no_plain_nodes_spec.rb
@@ -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'