-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add tests for --document-hidden-items
option
#113857
Merged
bors
merged 2 commits into
rust-lang:master
from
GuillaumeGomez:document-hidden-items-test
Jul 20, 2023
Merged
Add tests for --document-hidden-items
option
#113857
bors
merged 2 commits into
rust-lang:master
from
GuillaumeGomez:document-hidden-items-test
Jul 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cbb42c7
to
d9753d7
Compare
GuillaumeGomez
commented
Jul 19, 2023
@@ -274,6 +274,8 @@ def get_commands(template): | |||
args = shlex.split(args) | |||
except UnicodeEncodeError: | |||
args = [arg.decode('utf-8') for arg in shlex.split(args.encode('utf-8'))] | |||
except Exception as exc: | |||
raise Exception("line {}: {}".format(lineno + 1, exc)) from None |
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.
The from None
part is to go from:
Traceback (most recent call last):
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 274, in get_commands
args = shlex.split(args)
File "/usr/lib/python3.10/shlex.py", line 315, in split
return list(lex)
File "/usr/lib/python3.10/shlex.py", line 300, in __next__
token = self.get_token()
File "/usr/lib/python3.10/shlex.py", line 109, in get_token
raw = self.read_token()
File "/usr/lib/python3.10/shlex.py", line 191, in read_token
raise ValueError("No closing quotation")
ValueError: No closing quotation
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 708, in <module>
check(sys.argv[1], get_commands(rust_test_path))
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 691, in check
for c in commands:
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 278, in get_commands
raise Exception("line {}: {}".format(lineno, exc))
Exception: line 56: No closing quotation
to:
Traceback (most recent call last):
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 708, in <module>
check(sys.argv[1], get_commands(rust_test_path))
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 691, in check
for c in commands:
File "/home/imperio/rust/rust/src/etc/htmldocck.py", line 278, in get_commands
raise Exception("line {}: {}".format(lineno + 1, exc)) from None
Exception: line 57: No closing quotation
@bors r+ rollup |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 20, 2023
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#113710 (Fix rpath for libdir is specified) - rust-lang#113787 (Update documentation for std::process::Command's new method) - rust-lang#113795 (Properly document `lifetime_mapping` in `OpaqueTy`) - rust-lang#113857 (Add tests for `--document-hidden-items` option) - rust-lang#113871 (Use the correct span for displaying the line following a derive sugge…) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since
--document-hidden-items
was greatly fixed/improved in #113574, thought it might be worth adding some more tests for it to prevent new regressions.As for the first commit, it allows to go from:
to:
Having the line where the error occurred is quite useful.
r? @notriddle