There are some guidelines out there (eg scala guidelines) and I’m wondering if it’s okay to do some tidying up when committing other changes or if the commits should be more focused and to the point?
Eg – remove unused, reorder per style guide.
It might make it harder to read the pull request – but it will improve the project quality at least a little.
What’s your general rule of thumb? I’m not sure if I’m breaking unspoken taboos.
0
The rule of thumb is it’s okay if you already are submitting another change in that file, perhaps even encouraged. The reviewer will tell you if their personal preferences are different.
If you want to do cleanup only on files, that usually should go into its own pull request, and like other changes, you probably want to ask before undertaking it.