procxx / kepka

Unofficial Telegram Desktop messaging app
https://procxx.github.io
Other
114 stars 29 forks source link

Enforce code formatting using clang-format or AStyle #143

Closed leha-bot closed 6 years ago

leha-bot commented 6 years ago

For better code consistency we should make some commit hooks which would format new code.

@winger could you help with it? Thanks on advance.

The issue's text will be updated to reflect changes in task.

Comments are welcome.

ForNeVeR commented 6 years ago

I strongly dislike any commit hooks (in my personal experience, they tend to fail too much for various non-fatal reasons, such as not installed clang-format, for example). I'd prefer additional CI checks instead of client-side commit hooks.

leha-bot commented 6 years ago

@ForNeVeR I thought about that. We could either add clang-format as requirement for development to README.md or add a custom build step on CI. But I fear that the CI builds will be slower... We should check it!

Randl commented 6 years ago

To check formatting during CI we can use something like that: https://github.com/tiny-dnn/tiny-dnn/blob/master/cmake/clang-cxx-dev-tools.cmake

It shouldn't increase build time that much.

leha-bot commented 6 years ago

Closed by #158