babluboy / bookworm

A simple ebook reader for Elementary OS
GNU General Public License v3.0
1.32k stars 100 forks source link

Consistent Code Style #279

Closed onerbs closed 4 years ago

onerbs commented 4 years ago

There were too many inconsistencies in the code style, mixed tabs and spaces, sometimes 2-spaces indentation, sometimes 4. Fixed.

Based on elementary OS Code Style

babluboy commented 4 years ago

Many thanks for doing this, I’m guessing that this has happened due to me coding at different times in different editors....hopefully now I have settled with Code as my default editor....

Did you do this manually or by some automation? And did you check the functionality after the changes? The build is fine, but thought I would ask before merging as some of the metadata and build files were very sensitive to spaces...

onerbs commented 4 years ago

I did it manually. I guess with "metadata and build files" you mean other files outside the src folder, right? If so, no problem, I only touched vala files. There are no changes in logic, only in the indentation.

babluboy commented 4 years ago

Thanks - I have merged the PR. To ensure I don't mess up with the indentation again, any ideas on how to use code with the .editorconfig file you have added ?

onerbs commented 4 years ago

elementary Code has native support for it, it should follow the rules automatically. VSCode (ambiguity, haha) needs a plugin, just install it. In both cases, no further configuration is needed.

See EditorConfig.