Commit graph

26 commits

Author SHA1 Message Date
Robert Speicher
c424ce52c9
Ensure haml-lint checks Syntax
Also ensures we check Syntax with RuboCop, which is different.
2019-07-18 10:28:30 -05:00
Stan Hu
27381e22a9 Move files from lib/haml_lint to haml_lint
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.
2019-05-21 19:49:14 -07:00
Jan Provaznik
e556b421c5 Merge branch 'haml-lint-no-plain-nodes' into 'master'
Add HamlLint::Linter::NoPlainNodes linter

See merge request gitlab-org/gitlab-ce!28265
2019-05-21 13:56:10 +00:00
Luke Bennett
95afdfaeeb
Add HamlLint::Linter::NoPlainNodes linter
Add a simple haml_lint linter to report all plain nodes.
"Plain nodes" in HAML are scritpless plaintext leaf nodes.

Add haml-lint_todo to onboard new haml linters.
Excludes existing NoPlainNodes lints.
2019-05-20 20:25:32 +01:00
Will Hall
23266cc64d #60818 Correct linting for project root *.yml files 2019-05-20 13:50:32 +00:00
Stan Hu
17db4bf0d2 Regenerate Rubocop rules 2019-05-05 03:24:28 -07:00
Stan Hu
1a284ddac7 Add more HAML lint rules 2019-05-05 03:24:27 -07:00
Stan Hu
398371984f Add exceptions to HAML lint 2019-05-05 03:24:27 -07:00
Robert Speicher
a1cd338c6c
Enable Lint/UselessAssignment for haml-lint 2018-08-31 18:24:18 -07:00
Bob Van Landuyt
08c0a1b852 Reject ruby interpolation in externalized strings
When using ruby interpolation in externalized strings, they can't be
detected. Which means they will never be presented to be translated.

To mix variables into translations we need to use `sprintf`
instead.

Instead of:

    _("Hello #{subject}")

Use:

    _("Hello %{subject}) % { subject: 'world' }
2018-08-25 18:43:21 +02:00
winniehell
c6bf292efb Add custom linter for inline JavaScript to haml_lint (!9742) 2017-08-07 11:37:16 +02:00
Winnie Hellmann
bca5747d98 Upgrade haml_lint Gem to 0.26.0 2017-08-07 09:08:15 +00:00
Kushal Pandya
cd232bf7ee HAMLLint: Enable MultilinePipe rule 2017-01-24 10:09:28 -08:00
Kushal Pandya
41f130ea9b HAMLLint: Enable RubyComments rule 2017-01-24 10:09:28 -08:00
Kushal Pandya
c5c4b4aaea HAMLLint: Enable UnnecessaryStringOutput rule 2017-01-24 10:09:28 -08:00
Kushal Pandya
eeb6867633 HAMLLint: Enable UnnecessaryInterpolation rule 2017-01-24 10:09:28 -08:00
Kushal Pandya
8e2a76d2de HAMLLint: Enable SpaceInsideHashAttributes rule 2016-12-31 11:48:42 +05:30
Kushal Pandya
df4f896bcb HAMLLint: Enable TrailingWhitespace rule 2016-12-31 11:43:08 +05:30
Kushal Pandya
6f6f546bc2 HAMLLint: Enable SpaceBeforeScript rule 2016-12-31 11:43:08 +05:30
Kushal Pandya
7157f5857a HAMLLint: Enable ImplicitDiv rule 2016-12-31 11:43:08 +05:30
Kushal Pandya
fa432f0c07 HAMLLint: Enable HtmlAttributes rule 2016-12-31 11:43:08 +05:30
Kushal Pandya
08e083db1c HAMLLint: Enable FinalNewline rule 2016-12-31 11:43:08 +05:30
Kushal Pandya
ef3744d0cd HAMLLint: Enable ClassAttributeWithStaticValue rule 2016-12-31 11:43:08 +05:30
Kushal Pandya
21777aa1ff HAMLLint: Enable AltText rule 2016-12-31 11:43:08 +05:30
Rémy Coutable
bb406cadfe
Improve .haml-lint.yml, simplify the haml_lint task and remove CHANGELOG entry
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-13 18:56:00 +02:00
Rémy Coutable
427fc10dd9 Add .haml-lint.yml
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-13 09:24:42 +02:00