Detect invalid rustdoc test commands#80617
Conversation
camelid
left a comment
There was a problem hiding this comment.
I can't review the implementation since I'm not familiar with the code and not familiar with the regex style, but the output looks good. Do you want to try adding a failing assertion (like @has ... 'someRandomText') and check that the test fails just to make sure this didn't break anything? And you might to re-assign to someone else to review the implementation.
Thanks for fixing this!
src/etc/htmldocck.py
Outdated
There was a problem hiding this comment.
Maybe say
| 'Invalid command: `!@{0}{1}`, (try with `@!{1}`)'.format( | |
| 'Invalid command: `!@{0}{1}`, (help: try with `@!{1}`)'.format( |
to be consistent with rustc suggestion? Not a big deal though.
c1d5a26 to
da3eef6
Compare
Automatically, it would require a lot of changes. So not sure if it's a good idea... However, just to confirm it works I did a small change and it failed as expected: |
|
@bors r+ Thanks! |
|
📌 Commit da3eef6 has been approved by |
…laumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#80580 (Add suggestion for "ignore" doc code block) - rust-lang#80591 (remove allow(incomplete_features) from std) - rust-lang#80617 (Detect invalid rustdoc test commands) - rust-lang#80628 (reduce borrowing and (de)referencing around match patterns (clippy::match_ref_pats)) - rust-lang#80646 (Clean up in `each_child_of_item`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Yes, I meant to do a manual test just to make sure it's still picking up the assertions :) |
Fixes #80570.
There are now errors displayed in case of bad command syntax:
r? @camelid