canonical / ubuntu.com

The official website for the Ubuntu operating system
https://ubuntu.com
Other
192 stars 190 forks source link

Test fixtures should be ignored from inclusive-naming-check #12838

Open nottrobin opened 1 year ago

nottrobin commented 1 year ago

The inclusive naming check on e..g this PR is failing with:

  Raw Output:
  Warning: settes/TestRoutes.test_blog_date_notice.yaml:462:557: [warning] `master` may be insensitive, use `primary`, `main` instead
  Error: [Inclusive naming check] reported by reviewdog 🐶
  Warning:  `MASTER` may be insensitive, use `primary`, `main` instead

This is because the contents of blog articles that we're testing against contain URLs and references to repositories that still use "master" as a main branch. I don't think it's feasible to change this to make the checker happy.

It would generally make sense to exclude automatically retrieved API responses, which are mainly only meant to be read by the test library anyway, from the checker. But I couldn't see an easy way to do this from reading the ReviewDog README.

nottrobin commented 1 year ago

@petesfrench do you have any idea how we could exclude /tests/cassettes/* here?