xou816 / spot

Native Spotify client for the GNOME desktop
MIT License
2.25k stars 119 forks source link

add .editorconfig config #623

Closed alissonlauffer closed 1 year ago

alissonlauffer commented 1 year ago

This pull request adds an .editorconfig file to the repository to standardize code formatting across most editors and IDEs.

Including this file will ensure a consistent formatting style regardless of the editor or IDE used. This will minimize unnecessary whitespace code diffs in pull requests (made by different editor configurations).

Also, having a final newline in files is a good practice for git, as adding new code at the end of the current code will produce a reduced diff.

xou816 commented 1 year ago

Sounds reasonable :) Is there a way to apply the code style to the whole codebase automatically or will we have to go though every file at least once?

alissonlauffer commented 1 year ago

I'm afraid there isn't a tool for that, but I can do that job manually, as most files already follow this style guide (cargo fmt enforces trailing newlines and whitespace trimming by default).