Skip to content

Fix URLs to C++ Core Guidelines #5605

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mrotteveel
Copy link

@mrotteveel mrotteveel commented Aug 1, 2025

This PR replaces the URLs to the C++ Core Guidelines using the GitHub repository with the published site URL.

Some ids used in the links are not valid on the markdown file in the GitHub repository (https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md), but they are valid on the published site (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).

This fix will make the URLs actually useful, as it will link you directly to the linked item, instead of the top of the file in the repository.

Replace repo-url with published site URL.

The ids used are not valid on the GitHub repository (https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md), but are valid on the published site (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).
@mrotteveel
Copy link
Author

@microsoft-github-policy-service agree

Copy link
Contributor

Learn Build status updates of commit d95ce3e:

✅ Validation status: passed

File Status Preview URL Details
docs/code-quality/c26400.md ✅Succeeded
docs/code-quality/c26401.md ✅Succeeded
docs/code-quality/c26402.md ✅Succeeded
docs/code-quality/c26403.md ✅Succeeded
docs/code-quality/c26405.md ✅Succeeded
docs/code-quality/c26406.md ✅Succeeded
docs/code-quality/c26407.md ✅Succeeded
docs/code-quality/c26408.md ✅Succeeded
docs/code-quality/c26410.md ✅Succeeded
docs/code-quality/c26411.md ✅Succeeded
docs/code-quality/c26415.md ✅Succeeded
docs/code-quality/c26416.md ✅Succeeded
docs/code-quality/c26417.md ✅Succeeded
docs/code-quality/c26418.md ✅Succeeded
docs/code-quality/c26426.md ✅Succeeded
docs/code-quality/c26427.md ✅Succeeded
docs/code-quality/c26429.md ✅Succeeded
docs/code-quality/c26430.md ✅Succeeded
docs/code-quality/c26431.md ✅Succeeded
docs/code-quality/c26433.md ✅Succeeded
docs/code-quality/c26434.md ✅Succeeded
docs/code-quality/c26435.md ✅Succeeded
docs/code-quality/c26436.md ✅Succeeded
docs/code-quality/c26438.md ✅Succeeded
docs/code-quality/c26440.md ✅Succeeded

This comment lists only the first 25 files in the pull request.
For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Changed Files This PR contains more than 10 changed files.
File Change Percent This PR contains file(s) with more than 30% file change.

Copy link
Contributor

@Rageking8 Rageking8 left a comment

Choose a reason for hiding this comment

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

Some of the anchors work on GitHub, while others don't. However, there are a couple of links that point to the top of the page instead of the respective subsections. Those could be fixed in another commit or a follow-up PR.

Overall, good change to standardize the links to the published version, since the GitHub version was quite laggy due to the sheer size.

@@ -11,7 +11,7 @@ helpviewer_keywords: ["C26433"]

## C++ Core Guidelines

[C.128: Virtual functions should specify exactly one of virtual, override, or final](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md)
[C.128: Virtual functions should specify exactly one of virtual, override, or final](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines)
Copy link
Contributor

Choose a reason for hiding this comment

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

One such example.

Copy link
Author

Choose a reason for hiding this comment

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

I'll check if there are more without an explicit anchor and fix those.

Copy link
Author

Choose a reason for hiding this comment

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

Fix committed

Copy link
Contributor

Learn Build status updates of commit 52bb410:

✅ Validation status: passed

File Status Preview URL Details
docs/code-quality/c26400.md ✅Succeeded
docs/code-quality/c26401.md ✅Succeeded
docs/code-quality/c26402.md ✅Succeeded
docs/code-quality/c26403.md ✅Succeeded
docs/code-quality/c26405.md ✅Succeeded
docs/code-quality/c26406.md ✅Succeeded
docs/code-quality/c26407.md ✅Succeeded
docs/code-quality/c26408.md ✅Succeeded
docs/code-quality/c26410.md ✅Succeeded
docs/code-quality/c26411.md ✅Succeeded
docs/code-quality/c26415.md ✅Succeeded
docs/code-quality/c26416.md ✅Succeeded
docs/code-quality/c26417.md ✅Succeeded
docs/code-quality/c26418.md ✅Succeeded
docs/code-quality/c26426.md ✅Succeeded
docs/code-quality/c26427.md ✅Succeeded
docs/code-quality/c26429.md ✅Succeeded
docs/code-quality/c26430.md ✅Succeeded
docs/code-quality/c26431.md ✅Succeeded
docs/code-quality/c26433.md ✅Succeeded
docs/code-quality/c26434.md ✅Succeeded
docs/code-quality/c26435.md ✅Succeeded
docs/code-quality/c26436.md ✅Succeeded
docs/code-quality/c26438.md ✅Succeeded
docs/code-quality/c26440.md ✅Succeeded

This comment lists only the first 25 files in the pull request.
For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Changed Files This PR contains more than 10 changed files.
File Change Percent This PR contains file(s) with more than 30% file change.

@mrotteveel
Copy link
Author

mrotteveel commented Aug 1, 2025

Some of the anchors work on GitHub, while others don't. However, there are a couple of links that point to the top of the page instead of the respective subsections. Those could be fixed in another commit or a follow-up PR.

I now see that some links use an explicit anchor (defined in the .md), and others an implicit anchor (generated by the publishing tool, Jekyll). For example "C.128: Virtual functions should specify exactly one of virtual, override, or final" is both:

If you want, given I'm now touching all those files anyway, I could also make them all use the explicit anchor.

@v-dirichards
Copy link
Contributor

@TylerMSFT

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged Tracking label for the PR review team label Aug 1, 2025
@mrotteveel
Copy link
Author

@v-dirichards OK, I'm only wondering about my last comment regarding the inconsistent use of explicit and implicit (Jekyll generated, unstable IDs).

I actually have a change for that ready to replace all those with the explicit IDs, but maybe you prefer that as a separate follow-up PR?

@v-dirichards
Copy link
Contributor

@v-dirichards OK, I'm only wondering about my last comment regarding the inconsistent use of explicit and implicit (Jekyll generated, unstable IDs).

I actually have a change for that ready to replace all those with the explicit IDs, but maybe you prefer that as a separate follow-up PR?

That question is way outside of my area of expertise. I'll defer to Tyler for that.

@TylerMSFT
Copy link
Collaborator

@Mrottevell (Mark) - thank you for doing this work.

Regarding your question - let's use explicit IDs. Go ahead and submit that work and we'll do this all in one go.

I suppose there is a chance of being out-of-date by linking to the published site which can lag. But I think the benefits of going to the published site outweigh the negatives. Besides, when we add new links we can ensure that the published site is caught up before adding new links.

This is good - thank you!

Also replaced some explicit IDs with more specific explicit IDs for Bounds.N and Type.N (to the specific rule, instead of the section containing the rule).
Copy link
Contributor

Learn Build status updates of commit 7b5d19e:

✅ Validation status: passed

File Status Preview URL Details
docs/code-quality/c26400.md ✅Succeeded
docs/code-quality/c26401.md ✅Succeeded
docs/code-quality/c26402.md ✅Succeeded
docs/code-quality/c26403.md ✅Succeeded
docs/code-quality/c26405.md ✅Succeeded
docs/code-quality/c26406.md ✅Succeeded
docs/code-quality/c26407.md ✅Succeeded
docs/code-quality/c26408.md ✅Succeeded
docs/code-quality/c26409.md ✅Succeeded
docs/code-quality/c26410.md ✅Succeeded
docs/code-quality/c26411.md ✅Succeeded
docs/code-quality/c26414.md ✅Succeeded
docs/code-quality/c26415.md ✅Succeeded
docs/code-quality/c26416.md ✅Succeeded
docs/code-quality/c26417.md ✅Succeeded
docs/code-quality/c26418.md ✅Succeeded
docs/code-quality/c26426.md ✅Succeeded
docs/code-quality/c26427.md ✅Succeeded
docs/code-quality/c26429.md ✅Succeeded
docs/code-quality/c26430.md ✅Succeeded
docs/code-quality/c26431.md ✅Succeeded
docs/code-quality/c26432.md ✅Succeeded
docs/code-quality/c26433.md ✅Succeeded
docs/code-quality/c26434.md ✅Succeeded
docs/code-quality/c26435.md ✅Succeeded

This comment lists only the first 25 files in the pull request.
For more details, please refer to the build report.

Copy link
Contributor

PRMerger Results

Issue Description
Changed Files This PR contains more than 10 changed files.
File Change Percent This PR contains file(s) with more than 30% file change.

@mrotteveel
Copy link
Author

mrotteveel commented Aug 2, 2025

@TylerMSFT

@Mrottevell (Mark) - thank you for doing this work.

Regarding your question - let's use explicit IDs. Go ahead and submit that work and we'll do this all in one go.

OK, I just pushed the commit.

I also replaced some explicit IDs with more specific explicit IDs (for the Type.N and Bounds.N rules, for some rules it linked to the section containing the rules, and for others it linked to the specific rule, so I changed them to always link to the specific rule).

I suppose there is a chance of being out-of-date by linking to the published site which can lag. But I think the benefits of going to the published site outweigh the negatives. Besides, when we add new links we can ensure that the published site is caught up before adding new links.

The workflow file of the C++ Core Guidelines repository publishes on pushes to master, so the only delays I expect would be in caching.

This is good - thank you!

You're welcome :)

Copy link
Contributor

Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @TylerMSFT, @kylereedmsft, @Rastaban

@mrotteveel
Copy link
Author

(I guess I misunderstood the comment from Diane regarding the sign-off comment :) )

Copy link
Contributor

Invalid command: '#sign-off'. Only the assigned author of one or more file in this PR can sign off. @TylerMSFT, @kylereedmsft, @Rastaban

@Rageking8
Copy link
Contributor

(I guess I misunderstood the comment from Diane regarding the sign-off comment :) )

The sign-off comment is meant for the reviewer (in this repo pretty much only Tyler) to signal to the PR review team that this PR is ready to merge.

@TylerMSFT
Copy link
Collaborator

#sign-off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aq-pr-triaged Tracking label for the PR review team needs-human-review ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants