-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Show link text in problem report? #50
Comments
Hmm. I don’t agree with the thesis of: no link text is not useful report. Not all URLs, which can be down, have “text”. Definitions are checked too. I believe link text is often only useful in a particular context, which is still not there. This issue seems an indictment of Google: they use terrible URLs for extensions. Perhaps they should use better URLs. “Link text” also includes markdown things, I don’t believe we should typically show arbitrary markdown: it’ll render bold and emphasis and code and break out of the quote you show. I don’t see it. This seems like an exceptionally bad URL that proves the rule (most URLs are good). |
I’m not strongly against adding text, but I don’t see much value either. With the positional information and the URL itself it’s pretty clear what’s the problem IMO. |
@karlhorky don‘t you think this would be not so useful / pretty annoying for other cases? Mostly:
Or:
|
Not sure that this is my position, maybe I need to re-word. I think there's a ton of value already provided, but there is important context missing, for certain use cases.
So I'll comment on a use case - maybe it's a common use case too? Use case: running this on a large corpus of material which is growing and maintained by multiple people, with links on a periodic basis. Ideally, we'd love to have the following workflow, which would speed things up for us (I guess it would speed up other workflows that others have with periodic broken link checkers):
Without this, it requires an extra step and more friction to open the file and check what the context is. The title is minimal context to provide along with the error message, so I would argue it's good context to provide. With a "verbose" option, I could imagine that it shows a snippet of the Markdown / MDX source with a pointer showing where the offending link is - but that's not this proposal here.
Strongly disagree with this approach regarding error message design - providing more baseline context in error messages is almost always worth it to users versus the additional amount of space it takes. "Baseline" being that there is a dropping-off point where it stops making sense (but in those cases, if the info is important enough, then a link to an external error message with more details is often good).
Not sure about the "most URLs are good" assertion - I would assert the opposite actually. That the vast majority of URLs are bad, and that there are some inspirational movement in the last 10-15 years towards URLs which are better. But both are just gut-feel assertions I guess, probably not objective details to make decisions on.
Agreed, maybe the formatting needs work. The title could also be moved to the end:
Or an option, default off.
Interesting, I would agree - in my feeling, a bit less frequently than that I feel URLs are vague. In our case, our link text is high quality, because we control it, so it's only the URLs that are vague. |
I think you are looking for a different reporter. |
Perhaps you can try with https://github.com/vfile/vfile-to-eslint and https://github.com/eslint-community/eslint-formatter-codeframe. Not sure if it works. Something like that. |
Ok nice, thanks! I guess this should be closed as I would still say it's a nice option for |
Also, why not do step 5 before 2/3/4. You perform the step anyway. Use your code editor. Have these lint tools in your editor. You can click on this lint message and go to the markdown. There you see Take also a look at https://eslint.org/play/. Other remark lint rules are similar to ESLint I think: https://github.com/remarkjs/remark-lint#what-is-this. Uniform error reasons. With perhaps a variable of what is wrong and what is right. But not auxiliary information. Closing as wontfix, indeed! It sounds like a different reporter is what you are looking for. |
This comment has been minimized.
This comment has been minimized.
yep, that's the extra step / friction I mentioned above (friction = context switching):
Agreed with your general point - there is a balance. See also counterpoint - for years, browsers said "Cannot read properties In a vacuum, |
I don't see the context switching argument because you switch contexts already. Now from a to b. Then from b to a? Re the browsers: what is the "good" example you mean? As for some users wanting some things: sure. The systems in place are very extendable. Errors are objects: you get the node in question too. And reporters can report the source code if users want the source code. |
It's one extra context switch (
Can't find quickly the exact one I meant above, but here are 2 others, which mention adjacent data:
Also, this one from Safari, which is closer to what I mentioned above:
|
I don’t understand. CI fails. You context switch to your editor. You fix those URLs which are shown in your editor, by going through the Google for each URL. You have to be in your editor for saving the changed URL every time already. Push to origin. Done. As for the error messages you show: I think they’re good messages. I see them as an argument for having good messages, for not showing “undefined”, for not saying “URL is dead”. I do not see them as an argument for showing more info next to the URL. |
"by going through the Google" is the 2nd context switch. If it was right after "CI fails" (without switching to your editor), you eliminate 1 context switch. |
You have to google anyway. And use your editor anyway. And you switch between them. I do not understand you. |
Admittedly, I'm pretty picky about context switching. Not only because less of it makes me faster, but also because less of it confuses people less when watching me demonstrate something. Workflow with only URL:
Workflow with extra link text context:
|
@karlhorky Since you feel very strongly about what information you want presented. You could even try to integrate it into an interactive terminal like https://www.warp.dev/ to cut out the opening the browser step. That said I agree with @wooorm and @remcohaszing's comments, I don't see a major value add in including this, and see it as diverting away from the conventions that most lint/analysis tools follow. |
@karlhorky your diagram of steps isn’t like that for multiple dead URLs.
It sounds like you don’t use the tools there. Only tools in CI. |
We usually handle each URL individually, so the workflow + number of context switches doesn't change. But even with batching multiple URLs, doesn't change much actually, there's still 1 extra added context switch: Workflow with only URL:
Workflow with extra link text context:
We don't need to keep discussing though, the feature won't be accepted. We'll deal with the extra context switch or find a way to do a custom reporter.
Yeah, usually the entry point for a triggered CRON CI failure for us is a GitHub notification, which leads us to the GitHub Actions workflow logs. Arguably, there could be a nicer way with less friction if tools (and generally software) were less siloed and had more cross-tool capabilities, like Warp as Christian mentioned. (cue futuristic utopia meme) But I think we're a bit away from that still with current common tools and workflows which we also use. |
I am terribly sorry but I do not understand at all... I do not grasp your workflow. I recommend using these tools locally too: you can have them in your editor. It sounds like you only use these tools in CI. |
Initial checklist
Problem
Warnings output by
remark-lint-no-dead-urls
show the URL, but not the link text, making the report less useful than it could be:Solution
Showing the link text in the warning / error message:
If the URL doesn't have link text, then the output stays as it is now.
Alternatives
Not formatting it like a Markdown link:
The text was updated successfully, but these errors were encountered: