From ef9f30213ea3f1f18da2f9911026db1f9041a876 Mon Sep 17 00:00:00 2001 From: Lucas Gonze Date: Thu, 28 Sep 2023 17:38:41 -0400 Subject: [PATCH] Fix false positives against catalog headers expressed with markdown instead of html, at the cost of a very unreadable regular expression. This matches the following header: ([![Community Plus header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus) In addition to the prior header: New Relic Open Source community plus project banner. Apologies to future devs who have to strain their eyes to read the regular expression. It is fundamentally (A)|(B), where the contents of A and B are escaped. --- repolinter-rulesets/community-plus.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repolinter-rulesets/community-plus.yml b/repolinter-rulesets/community-plus.yml index 9da3651..d5b5f54 100644 --- a/repolinter-rulesets/community-plus.yml +++ b/repolinter-rulesets/community-plus.yml @@ -52,8 +52,7 @@ rules: nocase: true lineCount: 5 patterns: - - 'New Relic Open Source community plus project banner\.<\/picture><\/a>' - - https:\/\/opensource\.newrelic\.com\/oss-category\/#community-plus + -(New Relic Open Source community plus project banner\.<\/picture><\/a>)|(\(\[\!\[Community Plus header\]\(https\:\/\/github\.com\/newrelic\/opensource\-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png\)\]\(https\:\/\/opensource\.newrelic\.com\/oss\-category\/\#community\-plus\)) human-readable-pattern: Open source Community Plus header (see https://opensource.newrelic.com/oss-category) flags: i succeed-on-non-existent: false