-
Notifications
You must be signed in to change notification settings - Fork 3
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
[BUG] ignored
behaving like notScanned
#118
Comments
cc'ing @Martoon-00 |
Also, it's extremely confusing:
Furthermore, it seems we used the terms "traversal" and "scan" in the documentation/config/source code to refer to the same thing.. I've opened #119 to solve this particular problem. |
Okay, I think I found the difference between (Note: there's currently a bug in the latest master, see #120, so I'm using an older version from d6fb95f)
To sum up, there are 3 things we need to check:
To re-cap:
My conclusions:
Given the above, I think the simplest solution may be to just delete |
Ohhh, this is an extremely weird situation. I now realize that I got an inconsistent vision on this project, and this issue is the result 😒 The documentation is correct about the meaning of What I imagined initiallyI thought that we will have two stages - collection of files and verification. Initially verification had to account only for the files collected at the previous stage, and all other files - they like did not exist in the filesystem. If there was a reference to a file not from the list of collected files, we would throw an error. In this sense, the fact that Though I now admit that this separation in config relies on understanding of how the tool works, and this is not good. And the current implementation of What I gotEventually I made verification seek the referred files not in the list of the files collected at traversal stage, but in the filysystem using
And nowMaybe first it would be worth re-assessing, whether do we want to collect all the files in If we don't want to change this part, then we should include Overall interfaceActually, given these problems, I would not be surprised if all the exclusion settings ( I think the difference between
Also, we need at least one option that would say "this directory should not be even traversed", otherwise things like So at least What do you think? |
Thank you for the deep clarification @Martoon-00, much appreciated! 😄 One more re-cap! How the options should be working, as per the docs:
How they work at the moment:
Agreed. The user only cares about "what" the application does, not "how" it does it. I think that in the config file, we should get rid of the
Just to clarify, in the situation you described, the user would use And a use-case for
I agree, both use cases seem useful. Yet another problem I hadn't thought of before: the meaning of the word "ignore" in the
What I would like to propose:
This solves the naming inconsistencies I mentioned above. Furthermore, these names describe more accurately "what" the options do, and do not mention "how" they do it. |
Furthermore, I now realize the recently-introduced |
That does sound bad - just created an issue for this: #138 |
And that seems like another point of weirdness, since this mirrors the behaviour of I think will benefit from an option that is "do not verify local references to these files" too though. And there seems to be two sub-options here:
Other items seems to be correct 👍
I fully agree about getting rid of Maybe introduce at least the following sections?:
Yes to both.
Hmm, really. Also there is
Sounds good, yeah 👍 Maybe also distinguish |
I think it's "to", not "from". The docs say:
And, in the implementation, it seems to be used to "skip" checking whether a target file exists.
Hmm let's not implement this then. At least not until a real-world use case presents itself.
Agreed, let's have
Oh ouch, good catch, completely forgot about that one! What's worse is that
How about this: if we (1) rename the
|
Ah right, that's true.
Sounds good to me 👍 I only have one comment, will leave it in #171. |
Description
In the default config file, generated by
dump-config
, thetraversal.ignored
option is documented as follows:The
--help
text also says the following:However, it seems like this is not entirely true. If a file contains a reference to an
--ignored
file, that reference will still be verified (see demo below).So the question now is: is the implementation of
ignored
wrong? Or is the implementation right, and the documentation/help text wrong?If it's the latter (the implementation is right, the docs are wrong), then how is
ignored
different fromnotScanned
? They seem to have the same behavior at the moment... If a file is in eitherignored
or innotScanned
, then we will not check that its references are valid, but references to those files will still be checked.To Reproduce
Steps to reproduce the behavior:
Create a folder with these 2 files
Run xrefcheck and tell it to "pretend
b.md
doesn't exist":Expected behavior
I expected the link from
a.md
tob.md
to fail.Environment
The text was updated successfully, but these errors were encountered: