Enable HAML-LINT linters
What does this MR do?
This MR enables new HAML Linters as mentioned in #22072 (closed) (particularly in this comment)
-
AltText
-
ClassAttributeWithStaticValue
-
FinalNewline
-
HtmlAttributes
-
ImplicitDiv
-
SpaceBeforeScript
-
TrailingWhitespace
-
SpaceInsideHashAttributes
Are there points in the code the reviewer needs to double check?
Pretty much every change needs to be reviewed as we want to be sure that an attempt to fix a Lint rule doesn't cause any unintended side-effect (which otherwise doesn't happen)
Why was this MR needed?
See #22072 (closed) and discussion thread in same issue.
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #22072 (closed)
Merge request reports
Activity
added 2 commits
added 11 commits
-
485720d0...6e2a6fd0 - 3 commits from branch
master
-
b26b9110 - HAMLLint: Enable
AltText
rule -
4cfc8e2a - HAMLLint: fix
AltText
offences -
7999af0f - HAMLLint: Enable
ClassAttributeWithStaticValue
rule -
2d623690 - HAMLLint: Fix
ClassAttributeWithStaticValue
offences -
15b088ee - HAMLLint: Enable
FinalNewline
rule -
30b04a27 - HAMLLint: Fix
FinalNewline
offences -
04b7682d - HAMLLint: Enable
HtmlAttributes
rule -
4290cde7 - HAMLLint: Fix
HtmlAttributes
offences
Toggle commit list-
485720d0...6e2a6fd0 - 3 commits from branch
added 62 commits
-
4290cde7...358a2d8b - 52 commits from branch
master
-
c2a9e5ff - HAMLLint: Enable
AltText
rule -
be9dc7a7 - HAMLLint: fix
AltText
offences -
6913cd2f - HAMLLint: Enable
ClassAttributeWithStaticValue
rule -
a6341603 - HAMLLint: Fix
ClassAttributeWithStaticValue
offences -
8a64f380 - HAMLLint: Enable
FinalNewline
rule -
8d2534c3 - HAMLLint: Fix
FinalNewline
offences -
1dc106b4 - HAMLLint: Enable
HtmlAttributes
rule -
63714e8d - HAMLLint: Fix
HtmlAttributes
offences -
7a5aff1d - HAMLLint: Enable
ImplicitDiv
rule -
d8b977ec - HAMLLint: Fix
ImplicitDiv
offences
Toggle commit list-
4290cde7...358a2d8b - 52 commits from branch
added 14 commits
-
d8b977ec...f9e59516 - 2 commits from branch
master
-
ba410ecc - HAMLLint: Enable
AltText
rule -
a55521d7 - HAMLLint: fix
AltText
offences -
48612f02 - HAMLLint: Enable
ClassAttributeWithStaticValue
rule -
c5edfa96 - HAMLLint: Fix
ClassAttributeWithStaticValue
offences -
4b772963 - HAMLLint: Enable
FinalNewline
rule -
1f292b71 - HAMLLint: Fix
FinalNewline
offences -
5eab7be3 - HAMLLint: Enable
HtmlAttributes
rule -
546c6b05 - HAMLLint: Fix
HtmlAttributes
offences -
e5626cbf - HAMLLint: Enable
ImplicitDiv
rule -
b68d49b4 - HAMLLint: Fix
ImplicitDiv
offences -
2528f882 - HAMLLint: Enable
SpaceBeforeScript
rule -
c1ee775d - HAMLLint: Fix
SpaceBeforeScript
offences
Toggle commit list-
d8b977ec...f9e59516 - 2 commits from branch
added 16 commits
-
c1ee775d...0b95f765 - 2 commits from branch
master
-
1f0b4412 - HAMLLint: Enable
AltText
rule -
2411dac8 - HAMLLint: fix
AltText
offences -
abe6158a - HAMLLint: Enable
ClassAttributeWithStaticValue
rule -
4053358b - HAMLLint: Fix
ClassAttributeWithStaticValue
offences -
c90b0d94 - HAMLLint: Enable
FinalNewline
rule -
e882d115 - HAMLLint: Fix
FinalNewline
offences -
703938fc - HAMLLint: Enable
HtmlAttributes
rule -
aaa8f72d - HAMLLint: Fix
HtmlAttributes
offences -
c27832da - HAMLLint: Enable
ImplicitDiv
rule -
9c3c451e - HAMLLint: Fix
ImplicitDiv
offences -
1463ff96 - HAMLLint: Enable
SpaceBeforeScript
rule -
f54ddd2c - HAMLLint: Fix
SpaceBeforeScript
offences -
257ae825 - HAMLLint: Enable
TrailingWhitespace
rule -
5566f59d - HAMLLint: Fix
TrailingWhitespace
offences
Toggle commit list-
c1ee775d...0b95f765 - 2 commits from branch
added 62 commits
-
5566f59d...0ebd50ce - 46 commits from branch
master
-
95d56dc1 - HAMLLint: Enable
AltText
rule -
27f2be56 - HAMLLint: fix
AltText
offences -
3496ccaf - HAMLLint: Enable
ClassAttributeWithStaticValue
rule -
9aa2030a - HAMLLint: Fix
ClassAttributeWithStaticValue
offences -
8ba09b71 - HAMLLint: Enable
FinalNewline
rule -
2b4f25f1 - HAMLLint: Fix
FinalNewline
offences -
bb8eb55f - HAMLLint: Enable
HtmlAttributes
rule -
7da18243 - HAMLLint: Fix
HtmlAttributes
offences -
0e0eab59 - HAMLLint: Enable
ImplicitDiv
rule -
3746974c - HAMLLint: Fix
ImplicitDiv
offences -
2bb3c18e - HAMLLint: Enable
SpaceBeforeScript
rule -
878c7a75 - HAMLLint: Fix
SpaceBeforeScript
offences -
402f4722 - HAMLLint: Enable
TrailingWhitespace
rule -
ad90d758 - HAMLLint: Fix
TrailingWhitespace
offences -
cdff2bbd - HAMLLint: Enable
SpaceInsideHashAttributes
rule -
fe3c8385 - HAMLLint: Fix
SpaceInsideHashAttributes
offences
Toggle commit list-
5566f59d...0ebd50ce - 46 commits from branch
marked the task Conform by the merge request performance guides as completed
marked the task Conform by the style guides as completed
marked the task Squashed related commits together as completed
assigned to @alfredo1
- Resolved by Kushal Pandya
added 41 commits
-
fe3c8385...796b5b57 - 24 commits from branch
master
-
ca7cf15e - HAMLLint: Enable
AltText
rule -
35a17436 - HAMLLint: fix
AltText
offences -
a8d9254e - HAMLLint: Enable
ClassAttributeWithStaticValue
rule -
7e88b8f4 - HAMLLint: Fix
ClassAttributeWithStaticValue
offences -
579b11e4 - HAMLLint: Enable
FinalNewline
rule -
8b9e7e05 - HAMLLint: Fix
FinalNewline
offences -
0ca881f0 - HAMLLint: Enable
HtmlAttributes
rule -
faf1f445 - HAMLLint: Fix
HtmlAttributes
offences -
851a61d2 - HAMLLint: Enable
ImplicitDiv
rule -
080afcd5 - HAMLLint: Fix
ImplicitDiv
offences -
d422718b - HAMLLint: Enable
SpaceBeforeScript
rule -
b00b471b - HAMLLint: Fix
SpaceBeforeScript
offences -
be77027e - HAMLLint: Enable
TrailingWhitespace
rule -
2504c902 - HAMLLint: Fix
TrailingWhitespace
offences -
26ae1e03 - HAMLLint: Enable
SpaceInsideHashAttributes
rule -
0c44ee1a - HAMLLint: Fix
SpaceInsideHashAttributes
offences -
3802abf7 - HAMLLint: Fix
SpaceInsideHashAttributes
offence
Toggle commit list-
fe3c8385...796b5b57 - 24 commits from branch
Are we OK with merging this? @rspeicher @jschatz1
In theory. I'm wondering two things:
- Considering the "Pretty much every change needs to be reviewed as we want to be sure that an attempt to fix a Lint rule doesn't cause any unintended side-effect (which otherwise doesn't happen)" note in the description, I'm wondering if we want to do one linter per MR rather than all of them at once.
- I'm not sure about the
ImplicitDiv
linter. If people want to be explicit and do%div.some-class
instead of.some-class
, I'm fine with it.
@rspeicher I'm all in for idea of having MR per Linter
💯 and while this MR has a ton of changes, over 90% changes are purely cosmetic, especially the biggest offenderSpaceInsideHashAttributes
has over 900 modifications across the files is just addition of spaces which have absolutely no effect on behavior.What needs to be reviewed thoroughly is
AltText
,HtmlAttributes
andSpaceBeforeScript
, all of which have significantly low number of changes (which are not cosmetic). Also, I've kept commits for fixing each linter separate so that it is easier for reviewer to distinguish between changes.🙂 @kushalpandya are you going to create a MR for each rule?
@alfredo1 if we conclude to do so, otherwise I still feel it shouldn't be a problem to distinguish changes for each linter in this MR itself and push all the changes in one go without further delays.
🙂 Alright, @kushalpandya please do a last rebase so I can set it to MWPS
👍 assigned to @kushalpandya
added 232 commits
-
3802abf7...44fddd29 - 215 commits from branch
master
-
21777aa1 - HAMLLint: Enable
AltText
rule -
71dc50f0 - HAMLLint: fix
AltText
offences -
ef3744d0 - HAMLLint: Enable
ClassAttributeWithStaticValue
rule -
7b1944f9 - HAMLLint: Fix
ClassAttributeWithStaticValue
offences -
08e083db - HAMLLint: Enable
FinalNewline
rule -
1974deef - HAMLLint: Fix
FinalNewline
offences -
fa432f0c - HAMLLint: Enable
HtmlAttributes
rule -
71000b24 - HAMLLint: Fix
HtmlAttributes
offences -
7157f585 - HAMLLint: Enable
ImplicitDiv
rule -
dd5ffd9c - HAMLLint: Fix
ImplicitDiv
offences -
6f6f546b - HAMLLint: Enable
SpaceBeforeScript
rule -
598d8cab - HAMLLint: Fix
SpaceBeforeScript
offences -
df4f896b - HAMLLint: Enable
TrailingWhitespace
rule -
97f3c8f3 - HAMLLint: Fix
TrailingWhitespace
offences -
8e2a76d2 - HAMLLint: Enable
SpaceInsideHashAttributes
rule -
fb3e3654 - HAMLLint: Fix
SpaceInsideHashAttributes
offences -
e0f765ae - HAMLLint: Fix
SpaceInsideHashAttributes
offence
Toggle commit list-
3802abf7...44fddd29 - 215 commits from branch
Hi @alfredo1 I've resolved conflicts with latest rebase, please check.
assigned to @alfredo1
Thanks @kushalpandya works perfect!
👍 mentioned in commit 8dc2163c
mentioned in issue #22072 (closed)
@alfredo1 @kushalpandya was there a relevant EE counterpart for this? I had a bunch of errors merging CE => EE https://gitlab.com/gitlab-org/gitlab-ee/builds/8391569 - I will try to fix this myself for now...
Hi @jameslopez, sorry I was travelling. Are the errors resolved or you're still facing it?
@kushalpandya no worries! - all solved now!
added groupcode review label