Use help_page_url in HAML to resolve Gitlab/DocUrl cop rule
What does this MR do and why?
This is the first step to close #388561 (closed).
This MR attempts to replace documentation urls embedded as string literal in haml files with the use of help_page_url
, as the docs recommends: https://docs.gitlab.com/ee/development/documentation/#linking-to-help-in-ruby. !108558 (merged) separately is going to flag these cases as violation.
Changes are made manually as haml-lint does not support auto correction, unfortunately. Feel free to let me know if there should be a more elegant manner
Please note that commits are made incrementally with intention to highlight types of violation. If you want me to squash them in the first place though, let me know as well.
How to set up and validate locally
I wonder how in-depth I should have validated. I think I'm hoping there is already a systematic inspection that ensures these diffs as they appear are alright (haml-lint guarantees no obvious syntaxerror nor broken links, for example), without actually visiting every path? I'll be happy to be instructed
As of these two snippets from the diff, because they seemed to be more delicate than the others, I have tried in console that they construct proper strings:
- https://gitlab.com/gitlab-org/gitlab/-/blob/ac2a00724be47237ebc7dde66cb8e3bfdab6343c/app/views/groups/settings/_transfer.html.haml#L9-10
- https://gitlab.com/gitlab-org/gitlab/-/blob/ac2a00724be47237ebc7dde66cb8e3bfdab6343c/app/views/notify/unknown_sign_in_email.html.haml#L55-56
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.