-
Notifications
You must be signed in to change notification settings - Fork 9
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
Allow skip patterns to match exact filename #33
Comments
What might not be completely clear from the documentation is that the skip pattern matches on the entire value of any of the keys in the tap report. So maybe you can match on Does that solve your problem? |
I'm not really sure how that helps me. Consider that there are two pages in the site:
No matter what value I use, what will match the first will match the second. So |
What you can't properly see in my example is the leading space. The tap report inlines the paths in a sentence, which you can include in your match. Can you paste an example of the tap failure report? |
Aha! I did not see the leading space. I see what you mean now. I wouldn't say that's a very robust solution since it relies on the sentence structure, though it does at least give me a workaround until it breaks. |
It might make sense to add the root-relative url for local assets and the absolute url for external ones in a separate field so you can explicitly match on them. The trick is that a link to an asset can fail due to multiple reasons, and then you'd need to both check this path and the reason in order to construct a filter match. Doable programmatically, not so much as a command line argument without inventing new syntax. I'll think a bit about if this is one of the cases where the CLI is actually reducing the utility of the netlify plugin, because you can indeed define structured data to match on multiple properties in the netlify config |
@Munter I'd like to report that your workaround did work for me. The reason I need the workaround is because the page to which I'm linking is provided by a Netlify redirect. In this case, it's the |
There are certain target pages I would like checklinks to skip (which are satisfied by redirect rules). In particular, I want to skip references to the index.html file at the root of my site (related to #20). However, it's currently not possible to differentiate one index.html from another since the skip filter uses "includes" to match the pattern. As a result, when I specify "index.html" in
skipPatterns
, it ends up skipping references to all filenames anywhere in the site that end in "index.html".Would it be possible to make the skip pattern more strict? Perhaps if it starts and ends with
/
, it could be treated as a regular expression? Or if it doesn't contain a glob, it could be matched against the whole filename?The text was updated successfully, but these errors were encountered: