Github Actions improvements for write-rustdoc-hide-lines
(v2)
#1101
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.
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: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:
Expanded:
In order for this to work, I needed to switch some
eprintln
calls toprintln
, 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:Removed
main
documentationIn #923 I wrote some documentation for
main
on how to use the program. With the introduction ofREADME.md
, I think this should be removed. It will be hard to keep the instructions up to date if it is duplicated. (AlsoREADME.md
, in my opinion, is easier to work with.)