Skip to content

Fix deprecated class finder script

Sarah German requested to merge deprecated-class-finder-fix into main

What does this MR do and why?

Follow-up from !130 (comment 2000118043)

Bug fix for the deprecated class finder script. We need to ensure an exact match, instead of a partial match.

This fixes an issue with the previous version that made incorrect replacements like these:

gl-spinner-container => gl-animate-spinner-container
gl-spinner => gl-animate-spinner
gl-spinner-light => gl-animate-spinner-light
gl-spinner-md =>  gl-animate-spinner-md

We only want to replace gl-spin if it's a standalone class name, not a fragment of another class name.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. Run make lint-frontend. It should not find any deprecated classes.
  3. Add a gl-spin class somewhere, and run make lint-frontend again. This class should raise a warning.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Hiru Fernando

Merge request reports

Loading