Skip to content
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

Allow clippy::doc_markdown in code-validation and fix lint-tools job #1403

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Jun 14, 2024

Allow clippy::doc_markdown in code-validation

Fixes #1399!

This change disables the clippy::doc_markdown lint for our code-validation tool. This lint requires code-like text to be surrounded by backticks. The problem with it is that it thinks Tera templates {{ ... }} and front-matter are code-like, and wants backticks around them. Doing so would break the website, though.

While it is nice to catch missing backticks, it's not code-validation's first responsibility. It's first responsibility is to test all of our code blocks to ensure they are valid.

One final note: I originally tried using the [lint] table in Cargo.toml to disable this lint, but workspace = true is incompatible with this: I would have had to duplicate all of [workspace.lints] . Instead, I opted to just use a crate attribute.

Fix lint-tools job

There were several structs and fields that were never used, so I deleted them. Furthermore, IssueError was raising a warning because the fields of its variants were never read. I fixed this by implementing std::error::Error for it, which exposes the source error when the question mark ? operator is used. thiserror was already in our dependency tree, so it should not hurt compile times too much.

@BD103 BD103 added C-Bug A problem with the code that runs the site A-Build-System S-Needs-Review labels Jun 14, 2024
@BD103 BD103 marked this pull request as draft June 14, 2024 15:28
@BD103 BD103 changed the title Allow clippy::doc_markdown in code-validation Allow clippy::doc_markdown in code-validation and fix lint-tools job Jun 14, 2024
None of the dead code removed was ever used / read, so it was safe to delete. I believe deserialization should still work, but I'll need someone more familiar with `serde` to confirm this.
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 14, 2024
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review Ready for a maintainer to consider for merging and removed S-Needs-Review labels Jun 14, 2024
Merged via the queue into bevyengine:main with commit 6d6dd06 Jun 14, 2024
10 checks passed
@BD103 BD103 deleted the allow-doc-markdown branch June 14, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System C-Bug A problem with the code that runs the site S-Ready-For-Final-Review Ready for a maintainer to consider for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint-tools CI job fails after Rust 1.79 update
3 participants