Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document/link to skipPatterns and todoPatterns #160

Open
ComFreek opened this issue Jul 12, 2020 · 2 comments
Open

Document/link to skipPatterns and todoPatterns #160

ComFreek opened this issue Jul 12, 2020 · 2 comments

Comments

@ComFreek
Copy link

ComFreek commented Jul 12, 2020

Just by looking at the readme, I couldn't figure out what kind of syntaxes they accept 😄

@ComFreek
Copy link
Author

Related comment over at the underlying package used for checking links: Munter/hyperlink#148

@ComFreek ComFreek changed the title Document skipPatterns and todoPatterns Document/link to skipPatterns and todoPatterns Jul 12, 2020
@swyxio
Copy link

swyxio commented May 11, 2021

for posterity:

/** @type {FilterFunction} */
const skipFilter = (report) =>
Object.values(report).some((value) =>
skipPatterns.some((pattern) => String(value).includes(pattern))
);
/** @type {FilterFunction} */
const todoFilter = (report) =>
Object.values(report).some((value) =>
todoPatterns.some((pattern) => String(value).includes(pattern))
);

it just expects regex, but you can just do a strict filter too

String('docs/go/workflows/#large-event-histories').includes('#large-event-histories')

true

String('docs/go/workflows/#large-event-histories').includes('#foobar')
false

alphapapa added a commit to jarrodmillman/scientific-python-hugo-theme that referenced this issue Apr 10, 2024
Unlike the previous commit, which hoped that patterns were matched
against computed/expanded link targets, this hopes that patterns are
matched against HTML anchor HREF values.

See <https://github.com/Munter/netlify-plugin-checklinks#configuration>
and <Munter/netlify-plugin-checklinks#160>.
alphapapa added a commit to jarrodmillman/scientific-python-hugo-theme that referenced this issue Apr 10, 2024
Unlike the previous two commits, this hopes that patterns are matched
against the strings which show up in the log, like:

  FAIL load public/install

See <https://github.com/Munter/netlify-plugin-checklinks#configuration>
and <Munter/netlify-plugin-checklinks#160>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants