Skip to content

script: link check improvements#2209

Merged
murchandamus merged 3 commits into
bitcoin:masterfrom
jonatack:2026-07-link-check-improvements
Jul 10, 2026
Merged

script: link check improvements#2209
murchandamus merged 3 commits into
bitcoin:masterfrom
jonatack:2026-07-link-check-improvements

Conversation

@jonatack

@jonatack jonatack commented Jul 10, 2026

Copy link
Copy Markdown
Member

Don't raise on [url](url) or [url] in the markdown format check.

Instead, optionally flag [url](url) in a separate check with an appropriate message.

Finish with a few editorial touch-ups.

@jonatack jonatack added the CI label Jul 10, 2026
@jonatack

jonatack commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Checked these changes by running the script locally against this diff:

diff

--- a/bip-0003.md
+++ b/bip-0003.md
@@ -68,7 +68,7 @@ software. Some may even end up changing the consensus rules that the Bitcoin eco
 
 ### What is the Purpose of the BIPs Repository?
 
-The [BIPs repository](https://github.com/bitcoin/bips/) serves as a publication medium and archive for mature proposals.
+The [[https://github.com/bitcoin/bips/|text]] serves as a publication medium and archive for mature proposals.
 Through its high visibility, it facilitates the community-wide consideration of BIPs and provides a well-established
 source to retrieve the latest version of any BIP. The repository transparently records all changes to each BIP and
 allows any community member to retain a complete copy of the archive easily.
@@ -80,6 +80,8 @@ No formal or informal decision body governs Bitcoin development or decides adopt
 
 ## BIP Format and Structure
 
+[[https://github.com/bitcoin/bips|text]] serves as a publication medium and archive for mature proposals.
+
 ### Specification
 
 Authors may choose to submit BIPs in MediaWiki or Markdown[^markdown] format.
@@ -111,9 +113,10 @@ following list and address each as appropriate.
 
 Each BIP must begin with an [RFC 822-style header preamble](https://www.w3.org/Protocols/rfc822/). The headers must
 appear in the following order. Headers marked with "\*" are optional. All other headers are required.
+[http://example.com]
 
 ##### Overview
-
+[https://bitcoin.com](https://bitcoin.com)

BIP: <BIP number, or "?" before assignment>

  • Layer: <Consensus (soft fork) | Consensus (hard fork) | Peer Services | API/RPC | Applications>
    @@ -130,7 +133,7 @@ appear in the following order. Headers marked with "*" are optional. All other
  • Replaces: <BIP number(s)>
  • Proposed-Replacement: <BIP number(s)>
-
+[https://bitcoin.org https://bitcoin.org]
##### Header Descriptions

Before:

$ ./scripts/link-format-chk.sh
Github Markdown format writes links as [text](URL), not as [URL text] or [[URL|text]]:
- bip-0003.md:71:The [[https://github.com/bitcoin/bips/|text]] serves as a publication medium and archive for mature proposals.
- bip-0003.md:83:[[https://github.com/bitcoin/bips|text]] serves as a publication medium and archive for mature proposals.
- bip-0003.md:116:[http://example.com]
- bip-0003.md:119:[https://bitcoin.com](https://bitcoin.com)
- bip-0003.md:136:[https://bitcoin.org https://bitcoin.org]

After:

$ ./scripts/link-format-chk.sh                            
GitHub Markdown format writes links as [text](URL), not as [URL text] or [[URL|text]]:
- bip-0003.md:71:The [[https://github.com/bitcoin/bips/|text]] serves as a publication medium and archive for mature proposals.
- bip-0003.md:83:[[https://github.com/bitcoin/bips|text]] serves as a publication medium and archive for mature proposals.
- bip-0003.md:136:[https://bitcoin.org https://bitcoin.org]
Markdown links where the text matches the URL are redundant. Use <URL> instead:
- bip-0003.md:119:[https://bitcoin.com](https://bitcoin.com)

@murchandamus murchandamus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@murchandamus murchandamus merged commit c021a5f into bitcoin:master Jul 10, 2026
4 checks passed
@jonatack jonatack deleted the 2026-07-link-check-improvements branch July 10, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants