-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add configuration values auto markdown links to CHANGELOG.md
#10889
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
Conversation
r? @dswij (rustbot has picked a reviewer for you, use r? to override) |
The implementation looks good to me, but I'm not sure, if we want to add |
I don't really like depending on Also linking to source code instead of documentation feels wrong. It also doesn't make things easier that the stable book is usually updated after the changelog is written. It doesn't happen that often that a new configuration is added. Couldn't we add the link to it manually, if this happens? |
Is to book updated, at the same time that the new version is released? I'm guessing that most people only check the changelog after a release. This would most likely be fine.
I mean we could, but it's very likely that the list will get outdated fast. Since we already collect the data I think it would be better to automatically add the lints. Maybe we can do it as part of |
Good idea, let's update the changelog from The wrong part of the link should just be the
IIUC, yes. The Clippy book rides the same release train as normal Clippy. |
FWIW, there is also a nightly/beta version of the book: https://doc.rust-lang.org/nightly/clippy/ But it would still have the same link problems as the stable version, since the Clippy book is deployed from the Rust repo, not the Clippy repo. |
Nice, I was looking for something like that earlier. It should be fine linking to that one. We also link to the master version of our lint list.
Which problem do you mean? At the point when a changelog entry is added, it's already on rustc's master and the nightly book will also have been updated 🤔 |
We run a link checker in CI, that verifies links in the book, so that we don't link to a 404 page. I'm not sure, if the link checker cares about the |
The |
I don't think we have to link to the nightly one in the changelog. The changelog gets written for the stable version. By the time people click on the changelog (through the rustc release notes) the stable book will already have the stable config values of the changelog in it. |
7bacfa8
to
f93df98
Compare
? |
Could you re-review it? Now it works with |
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.
LGTM. Only one comment. Please excuse my OCD. 😅
} | ||
writeln!( | ||
changelog_file, | ||
"{changelog}<!-- begin autogenerated links to configuration documentation -->\n{}\n<!-- end autogenerated links to configuration documentation -->\n", |
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.
"{changelog}<!-- begin autogenerated links to configuration documentation -->\n{}\n<!-- end autogenerated links to configuration documentation -->\n", | |
"{changelog}<!-- begin autogenerated links to configuration documentation -->\n{}\n<!-- end autogenerated links to configuration documentation -->", |
Now remove the extra newline and this is good to go.
r=me once my comment is addressed. (You might want to squash the commits) @bors delegate+ |
This new extra comment from bors, about |
Yes, I was excited about this too. I even thought about including an explanation what |
Bors is truly AI blockchain-based machine learning technology |
I'm sure the profile picture is an NFT worth millions! |
5de579e
to
013dbbc
Compare
Add configuration values auto markdown links to `CHANGELOG.md` Related to [this Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Revisiting.20.20Clippy's.20configuration.20discover/near/363119950). Now `cargo dev update_lints` also includes configurations as Markdown links, so changes to configuration can be linked directly. It links to [this file](https://github.com/rust-lang/rust-clippy/blob/master/book/src/lint_configuration.md) (`book/src/lint_configuration.md`) because a new changelog may be deployed before the website is updated. So, in order to avoid broken links, this is the simplest way. changelog:none
💔 Test failed - checks-action_test |
How ironic. Please rebase on current master and run that and then this should merge. |
013dbbc
to
060c9bc
Compare
060c9bc
to
d5b2f11
Compare
@bors r=flip1995 |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Related to this Zulip discussion.
Now
cargo dev update_lints
also includes configurations as Markdown links, so changes to configuration can be linked directly.It links to this file (
book/src/lint_configuration.md
) because a new changelog may be deployed before the website is updated. So, in order to avoid broken links, this is the simplest way.changelog:none