-
Notifications
You must be signed in to change notification settings - Fork 143
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
Ignore specific warnings -- Am I on the right track? #788
Conversation
We want to allow specifying a warning to ignore for each URL. If no regex is specified for the warning to ignore, we'll ignore all warnings. The tests still pass as they are, which means that unknown values in the configuration file are simply ignored.
Happy to see this. Extending the idea of multiline ignoreerrors to ignorewarnings seems the way to go for a general solution. I had hoped an extra config entry wouldn't be needed and ignorewarnings could be used with multiline as well. But I hadn't thought much about it, maybe that isn't even a good idea, and if it isn't obvious then it probably isn't worth implementing it. Perhaps it would even be hard to make sense of if you had some traditional ignorewarnings and some url ones. Aliases for warnings is probably a step too far, if I understand the thought - there are multiple codes for a redirect anyway? Not that I have thought about it before, maybe I could be convinced. As of 10.4 it is possible to pass the config on the command line: see #767. Maybe there are some other scenarios. It might be best getting this one to a conclusion and then thinking about any further features. Great to see tests in here, as you say only docs to go - I understand leaving those to last. Off the top of my head @need_network was really need Internet, as some of those files use example.com. But I haven't looked at that for a while. On a quick look I haven't spotted anything scary (although I reserve that possibility after a proper look!) looks like you have thought it through. Let's see if the tests pass now and when you feel the PR is complete do say - I do find the project commit history useful, personally I prefer it to tell the story of the functionality not the development history, and I like small commits if they make it easier to understand. Feel free to squash and rebase up to the point you declare it ready. |
Ah, 302 probably wasn't meant as an alias but an optional |
Type: Opinion 💬 I think that while it’s better to have the
In my opinion, it’s better to control redirects rather than ignore them. It would be nice to allow linkchecker users to specify regular expressions for expected (allowed) redirects in the Thanks. |
Thanks for clarifying. |
Thanks for the comments.
The question is whether the configuration for this feature should allow (as is currently):
or if it should instead require:
I think I prefer the former. I find it more explicit, for me who is not well versed in web coding. In addition, it required less work because 'http-redirected' is what |
Good to know (I didn't...). Thanks. |
I see it as consistency with both So as coded at the moment the documentation would start with:
taking a bit from both of them. |
Will open another PR with the doc and some history simplifications. |
I've been working on #782. The code as I have it now fits my needs. Before I invest more time in it to refine and document the behaviour, I would appreciate a confirmation that I'm on the right track.
Could one of the maintainers look at 12e47c9...b928c0e and let me know how this looks like to them?
I would then keep working on the topics mentioned in #782 (comment). Please let me know if I'm missing something.