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

Github Actions improvements for write-rustdoc-hide-lines (v2) #1101

Merged
merged 8 commits into from Mar 16, 2024

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Mar 12, 2024

Alternative to #1069.

Annotations

This makes write-rustdoc-hide-lines emit error annotations using workflow commands when a file is not formatted correctly and when running through Github Actions. These annotations show up in the job summary:

image

Group files checked

This additionally groups the list of files checked into a collapsible section when running in Github Actions, so they are not confused with the files that need formatting. Fixes #1100.

Collapsed:

image

Expanded:

image

In order for this to work, I needed to switch some eprintln calls to println, because Github Actions was not detecting them sequentially and error messages were being hidden.

How to fix errors

When write-rustdoc-hide-lines fails, it will now print a message saying how to fix the error:

Run write_rustdoc_hide_lines.sh to automatically fix these errors.

Removed main documentation

In #923 I wrote some documentation for main on how to use the program. With the introduction of README.md, I think this should be removed. It will be hard to keep the instructions up to date if it is duplicated. (Also README.md, in my opinion, is easier to work with.)

"The following files are not formatted:" was being grouped when it should not have been. I theorize that because stdout and stderr are two different streams, Github Actions thinks that "::endgroup::" happens after the error message.
@BD103 BD103 marked this pull request as ready for review March 12, 2024 16:01
@BD103 BD103 requested a review from mockersf March 12, 2024 16:01
@mockersf mockersf added this pull request to the merge queue Mar 16, 2024
@mockersf mockersf added the S-Ready-For-Final-Review Ready for a maintainer to consider for merging label Mar 16, 2024
Merged via the queue into bevyengine:main with commit b4e2745 Mar 16, 2024
10 checks passed
@BD103 BD103 deleted the hide-lines-3 branch March 16, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System C-Usability 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.

Group hide-lines checked files together in CI
3 participants