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

Add --ignore-paths option #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

eFrane
Copy link

@eFrane eFrane commented Sep 3, 2020

This can be used to disable the validation on some paths.

Example use case are auto-generated paths in a VuePress site which do not exist as markdown file but may be linked to.

I am not entirely happy with this. Ideally, having a path ignored should - in my opinion - exit out of that links' evaluation. Unfortunately, the only way I see to implement this would be to wrap the whole evaluation step in a try-catch and throw out if ignorePaths.includes(pathname). Instead of doing that, I would much rather untangle the beast the if-chain is becoming. That is a discussion to be had separately (or started here and moved to a separate PR?)

Another thing with change: Things won't work with attached fragments. This goes back to the above issue of the continued evaluation. I'm sure there's a condition in there which can be slightly modified to catch ignored paths with fragments too, but I failed to identify it. 🙁

Anyway, thanks for this awesome tool, it's a huge time saver. ❤️

This can be used to disable the validation on some paths.
Example use case are auto-generated paths in a VuePress site
which do not exist as markdown file but may be linked to.
@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2020

Codecov Report

Merging #10 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #10   +/-   ##
=======================================
  Coverage   97.89%   97.89%           
=======================================
  Files           2        2           
  Lines         190      190           
=======================================
  Hits          186      186           
  Misses          4        4           
Impacted Files Coverage Δ
bin.js 93.33% <ø> (ø)
index.js 98.28% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30a539a...0bd562e. Read the comment docs.

@bidoubiwa
Copy link

Could you add some tests ? Mostly to understand the usage

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

Successfully merging this pull request may close these issues.

3 participants