Skip to content

Ignore button findings that are probably dropdowns

Mark Florian requested to merge reduce-button-finding-overlap-with-dropdowns into main

Ignore button findings in dropdown files

For gitlab-org/gitlab@79abc488, this removes seven findings:

This is a genuine finding that should instead be migrated to a compliant dropdown (there's no point migrating the button itself):

These three are false positives, as they are deprecated filtered search items (e.g, see gitlab-org/gitlab@9949f57c for similar ones):

These are buttons in a dropdown helper Ruby module, which probably shouldn't be used at all, and simply deleted:

Ignore dropdown button findings

In total, this removes 21 button findings.

15 of these findings included dropdown in the same line as gl-button, which should be covered by dropdown rules.

These could be seen by running a scan before this commit and using this query:

extra.metadata[pajamasCompliant eq false and componentLabel eq
"component:button"] and not path co "dropdown" and extra.lines co
"dropdown"

A few examples are:

This also removes 6 more findings which weren't real button findings:

Addresses #86

Screenshots

Before After
Screenshot_2023-10-17_at_14-49-45_Pajamas_Adoption_Scanner_Dashboard Screenshot_2023-10-17_at_14-49-49_Pajamas_Adoption_Scanner_Dashboard

Review/run this locally

  1. Copy the pages in mr job URL (must have succeeded)
  2. Run bin/review-mr.sh <job url>
Edited by Mark Florian

Merge request reports