-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix false negatives for CI/CD external URL checks
This commit fixes failing CI/CD worklows due to false positive URL checks by adding ignore rules to the checks. It also resolves a dead URL by using its archived version for its current URL. Changes: - Use separate config file to configure dead URL checks - Add FQDN-based ignore rules - Fix a dead URL by using its new URL in archived version
- Loading branch information
1 parent
e11821f
commit 451ca76
Showing
4 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import remarkLintNoDeadUrls from 'remark-lint-no-dead-urls'; | ||
|
||
/** @type {import('remark-lint-no-dead-urls').Options} */ | ||
const Options = { | ||
skipUrlPatterns: [ | ||
// These result in false negatives | ||
'archive.ph', | ||
'scoop.sh', | ||
].map(buildUrlPattern), | ||
}; | ||
|
||
/** @type {Omit<import('unified-engine').Preset} */ | ||
export default { | ||
plugins: [[remarkLintNoDeadUrls, Options]], | ||
}; | ||
|
||
function buildUrlPattern(fqdn) { | ||
const escaped = fqdn.replace(/\./g, '\\.'); | ||
return `^https://${escaped}/.*$`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters