You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
On all of our repos we have a CI check that ensures rustfmt has been run and fails the build if it has not, and we are experimenting with changing to use the actions-rs action for just that instead of Travis & Buildkite.
But one thing we've thought about (cc @Jake-Shadle) that may be even better alternative workflow would be a rustfmt action that instead of warning or failing a PR on fmt differences actually just runs cargo fmt and commits & pushes changed files to the PR branch.
How hard would it be to create such an action?
Probably is not the best workflow for everyone, but we typically squash our commits so some occasional "Rustfmt" commits is fine, and nice to not have to do manually and push up on a broken build.
This is mostly a problem because RLS doesn't work in our large projects (EmbarkStudios/rust-ecosystem#8) which makes rustfmt not automatically run in VS Code so formatting on save often doesn't work so code slips in without correct formatting.
The text was updated successfully, but these errors were encountered:
I had a different idea: add a rustfmt-check like clippy-check. Since GitHub now (beta) supports multiline diff comments as well as suggestions, the output of cargo clippy -- --check can be parsed and turned into suggestions directly on the PR.
(Of course, this is assuming GitHub decides to give the token used for running PRs from forks write permissions to the PR comments to be of any real use.)
On all of our repos we have a CI check that ensures rustfmt has been run and fails the build if it has not, and we are experimenting with changing to use the
actions-rs
action for just that instead of Travis & Buildkite.But one thing we've thought about (cc @Jake-Shadle) that may be even better alternative workflow would be a rustfmt action that instead of warning or failing a PR on fmt differences actually just runs
cargo fmt
and commits & pushes changed files to the PR branch.How hard would it be to create such an action?
Probably is not the best workflow for everyone, but we typically squash our commits so some occasional "Rustfmt" commits is fine, and nice to not have to do manually and push up on a broken build.
This is mostly a problem because RLS doesn't work in our large projects (EmbarkStudios/rust-ecosystem#8) which makes rustfmt not automatically run in VS Code so formatting on save often doesn't work so code slips in without correct formatting.
The text was updated successfully, but these errors were encountered: