From 94e34cce3b12573e5d6618c684a770c35700a51a Mon Sep 17 00:00:00 2001 From: Lucas Gonze Date: Thu, 28 Sep 2023 17:38:41 -0400 Subject: [PATCH 1/2] 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..dad0468 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 From c5b8171b65dec4e89533d69db73482b6260d19d6 Mon Sep 17 00:00:00 2001 From: Lucas Gonze Date: Fri, 15 Dec 2023 11:32:04 -0500 Subject: [PATCH 2/2] Update every ruleset and remove that 2nd line, approach suggested in https://github.com/newrelic/.github/pull/40#issuecomment-1854540330 --- repolinter-rulesets/community-plus.yml | 2 +- repolinter-rulesets/community-project.yml | 1 - repolinter-rulesets/example-code.yml | 1 - repolinter-rulesets/new-relic-experimental.yml | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/repolinter-rulesets/community-plus.yml b/repolinter-rulesets/community-plus.yml index dad0468..05be508 100644 --- a/repolinter-rulesets/community-plus.yml +++ b/repolinter-rulesets/community-plus.yml @@ -52,7 +52,7 @@ rules: nocase: true lineCount: 5 patterns: - - '(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\))' + - 'New Relic Open Source community plus project banner\.<\/picture><\/a>' human-readable-pattern: Open source Community Plus header (see https://opensource.newrelic.com/oss-category) flags: i succeed-on-non-existent: false diff --git a/repolinter-rulesets/community-project.yml b/repolinter-rulesets/community-project.yml index f0e468f..29fc127 100644 --- a/repolinter-rulesets/community-project.yml +++ b/repolinter-rulesets/community-project.yml @@ -53,7 +53,6 @@ rules: lineCount: 5 patterns: - 'New Relic Open Source community project banner\.<\/picture><\/a>' - - https:\/\/opensource\.newrelic\.com\/oss-category\/#community-project human-readable-pattern: Open source Community header (see https://opensource.newrelic.com/oss-category) flags: i succeed-on-non-existent: false diff --git a/repolinter-rulesets/example-code.yml b/repolinter-rulesets/example-code.yml index 30b69d4..8de4ac5 100644 --- a/repolinter-rulesets/example-code.yml +++ b/repolinter-rulesets/example-code.yml @@ -53,7 +53,6 @@ rules: lineCount: 5 patterns: - 'New Relic Open Source example project banner\.<\/picture><\/a>' - - https:\/\/opensource\.newrelic\.com\/oss-category\/#example-code human-readable-pattern: Open source Example Code header (see https://opensource.newrelic.com/oss-category) flags: i succeed-on-non-existent: false diff --git a/repolinter-rulesets/new-relic-experimental.yml b/repolinter-rulesets/new-relic-experimental.yml index 1a4ea1f..b6a7f8b 100644 --- a/repolinter-rulesets/new-relic-experimental.yml +++ b/repolinter-rulesets/new-relic-experimental.yml @@ -53,7 +53,6 @@ rules: lineCount: 5 patterns: - 'New Relic Open Source experimental project banner\.<\/picture><\/a>' - - https:\/\/opensource\.newrelic\.com\/oss-category\/#new-relic-experimental human-readable-pattern: Open source experimental header (see https://opensource.newrelic.com/oss-category) flags: i succeed-on-non-existent: false