-
Notifications
You must be signed in to change notification settings - Fork 897
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
[linters] Check link-anchor for #
stutter
#2313
[linters] Check link-anchor for #
stutter
#2313
Conversation
Here is an example of the check at work (excerpt from https://github.com/open-telemetry/opentelemetry-specification/runs/5052423559?check_suite_focus=true): $ make markdown-link-check
FILE: ./specification/compatibility/opentracing.md
37 links checked.
Error: link anchor contains double ## on these line(s):
504:[Link](../trace/api.md##specifying-links) functionality. This information
make: *** [Makefile:33: markdown-link-check] Error 1
Error: Process completed with exit code 2. |
Of course this is a simple syntactic check that might, down the line, register false-positives but IMHO we can face that situation if/when it arises. In the meantime, it'll be nice to catch anchor-hash stutters on PR submission. |
8c0e51a
to
248ded7
Compare
#2312 has been merged, I've rebased. The check is still failing -- I'm investigating now. |
@@ -29,7 +30,13 @@ $(MARKDOWN_LINK_CHECK): | |||
|
|||
.PHONY: markdown-link-check | |||
markdown-link-check: $(MARKDOWN_LINK_CHECK) | |||
@for f in $(ALL_DOCS); do $(MARKDOWN_LINK_CHECK) --quiet --config .markdown_link_check_config.json $$f; done | |||
@for f in $(ALL_DOCS); do \ | |||
$(MARKDOWN_LINK_CHECK) --quiet --config .markdown_link_check_config.json $$f; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so this is the current behavior:
- If there is a double hash in an anchor, the check will fail
- If there are invalid links, they will be reported by
markdown-link-check
, but the check will pass. This was the behavior before this PR -- presumably because there were too many false positives(?). If this was an oversight and you'd like the check to fail when invalid links are discovered, then all we need to do is change the;
at the end of this line to&&
.
Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you found a bug here. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was fixed via #2323 -- see https://github.com/open-telemetry/opentelemetry-specification/pull/2323/files#r801649513.
#
stutter#
stutter
be1330b
to
6c4edff
Compare
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
6c4edff
to
f3fa33d
Compare
@carlosalberto et all: any consideration being given to this extra check? |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
#
stutter#
stutter
Hi @carlosalberto et all: before I spend time resolving conflicts on this PR I wanted to know if you saw value in this extra check? If not, we can continue to detect it in the same way I've been doing it before, that is, when I build the spec through the website. I'm ok either way. |
Thanks for the feedback @carlosalberto and @Oberon00. |
Updating and re-submitting it is enough with me ;) |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Since the identified issue was fixed in #2323, I'm going to close this PR since I no longer thing that it is worth the extra check of anchor-hash stutters. |
This adds a link-anchor hash-stutter check for an error that seems to creep in now and again, for example:
##
->#
#2312##
->#
#2075NOTE: The build for this PR will fail (demonstrating that the check is working) until #2312 is merged.
/cc @austinlparker @tedsuo @carlosalberto