linux-speakup / espeakup

a light weight connector for espeak-ng and speakup
GNU General Public License v3.0
32 stars 12 forks source link

use Clang format to enforce code style #32

Closed alex19EP closed 3 years ago

alex19EP commented 3 years ago

note: this requires #30 and #31

I tried to keep the general style of the code. and at the same time improved the readability, at least so it seems to me.

williamh commented 3 years ago

Please stick with K&R style with tabs for indentation. I find multiple spaces per indent level very hard to work with.

williamh commented 3 years ago

Also, I ask that you not delete .indent.pro in this pr, we can do that once we make sure klang-format produces the same formatting this .indent.pro does.

alex19EP commented 3 years ago

Please stick with K&R style with tabs for indentation. I find multiple spaces per indent level very hard to work with.

I don't quite understand. now tab is used for indentation, and spaces are used only for code alignment.

I would like to leave spaces for alignment, as they make it easier to read code on the braille display.

Also, I ask that you not delete .indent.pro in this pr, we can do that once we make sure klang-format produces the same formatting this .indent.pro does.

ok. will bring it back.

williamh commented 3 years ago

I would not make any manual changes in the same commit where the formatter makes changes. For example, I see espeak being changed to espeak-ng several times in this commit. If you combine your own changes with changes the formatter made, it is not possible to tell which ones are which.

alex19EP commented 3 years ago

I would not make any manual changes in the same commit where the formatter makes changes. For example, I see espeak being changed to espeak-ng several times in this commit. If you combine your own changes with changes the formatter made, it is not possible to tell which ones are which.

oh sorry didn’t think about it at all. fixed.