r-lib / actions

GitHub Actions for the R community
Creative Commons Zero v1.0 Universal
930 stars 200 forks source link

Run formatter on example YAML files? #857

Closed IndrajeetPatil closed 1 month ago

IndrajeetPatil commented 1 month ago

Currently, if I open any of the workflows and open it in VS Code and save the file, the Prettier formatter introduces quite a few white space or quote related changes. The only way I can undo this is by discarding the changes in git, which is cumbersome.

It would instead be nice to run a formatter on the example files in this repo so none of the users need to do this.

If you are open to this change, I can open a PR.

gaborcsardi commented 1 month ago

If we do this, then when people update their workflows, it will be very hard for them to tell what has changed.

IndrajeetPatil commented 1 month ago

Fair enough.

But, as a counterpoint, most git clients provide a way to hide whitespace changes (RStudio, GitHub desktop, bitbucket, gitkraken, etc.), so it's not too difficult to ignore them and focus on the important code changes.

Let me run the formatter locally and see how large the git diff is. If it's too large, I will close the issue. But, if not, I can make a PR and then you can assess if it's worth merging.

github-actions[bot] commented 1 month ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue