summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-07-18 17:15:53 +0000
committerStan Hu <stanhu@gmail.com>2019-07-18 17:15:53 +0000
commit53c0c4335a737068ddd57639b85028a88effa946 (patch)
tree7687ef302b0988c63ea1c321f242817793361f87
parent43cbc233df451ffd0fbc93212cfde126554f2a66 (diff)
parent41e2be78b58f63d5637ea97093118ab0fb5fdcd5 (diff)
downloadgitlab-ce-53c0c4335a737068ddd57639b85028a88effa946.tar.gz
Merge branch 'rs-haml-lint-rubocop-syntax' into 'master'
Enable RuboCop syntax linting in haml-lint Closes #64753 See merge request gitlab-org/gitlab-ce!30903
-rw-r--r--.haml-lint.yml4
-rw-r--r--app/views/admin/users/index.html.haml2
-rw-r--r--app/views/devise/sessions/_new_ldap.html.haml4
3 files changed, 6 insertions, 4 deletions
diff --git a/.haml-lint.yml b/.haml-lint.yml
index 0412b24a48c..399fa9656a0 100644
--- a/.haml-lint.yml
+++ b/.haml-lint.yml
@@ -118,7 +118,6 @@ linters:
- Lint/ParenthesesAsGroupedExpression
- Lint/RedundantWithIndex
- Lint/SafeNavigationConsistency
- - Lint/Syntax
- Metrics/BlockNesting
- Naming/VariableName
- Performance/RedundantMatch
@@ -155,6 +154,9 @@ linters:
enabled: true
style: space
+ Syntax:
+ enabled: true
+
Indentation:
enabled: true
character: space # or tab
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index c3d5ce0fe70..6fc7ec1bb6f 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -52,7 +52,7 @@
= icon("search", class: "search-icon")
= button_tag s_('AdminUsers|Search users') if Rails.env.test?
.dropdown.user-sort-dropdown
- - toggle_text = if @sort.present? then users_sort_options_hash[@sort] else sort_title_name end
+ - toggle_text = @sort.present? ? users_sort_options_hash[@sort] : sort_title_name
= dropdown_toggle(toggle_text, { toggle: 'dropdown' })
%ul.dropdown-menu.dropdown-menu-right
%li.dropdown-header
diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml
index a8e34b6da9c..31c4bb0e33e 100644
--- a/app/views/devise/sessions/_new_ldap.html.haml
+++ b/app/views/devise/sessions/_new_ldap.html.haml
@@ -3,10 +3,10 @@
= form_tag(omniauth_callback_path(:user, server['provider_name']), id: 'new_ldap_user', class: "gl-show-field-errors") do
.form-group
= label_tag :username, "#{server['label']} Username"
- = text_field_tag :username, nil, { class: "form-control top", title: "This field is required.", autofocus: "autofocus", data: { qa_selector: 'username_field' } required: true }
+ = text_field_tag :username, nil, { class: "form-control top", title: "This field is required.", autofocus: "autofocus", data: { qa_selector: 'username_field' }, required: true }
.form-group
= label_tag :password
- = password_field_tag :password, nil, { class: "form-control bottom", title: "This field is required.", data: { qa_selector: 'password_field' }required: true }
+ = password_field_tag :password, nil, { class: "form-control bottom", title: "This field is required.", data: { qa_selector: 'password_field' }, required: true }
- if devise_mapping.rememberable?
.remember-me
%label{ for: "remember_me" }