You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to propose using clang-format instead of (or with) astyle code formatter due astyle seems rather dead than alive. Moreover lots of IDEs has built-in clang-format, while CLion, for example has no even pluggable support of astyle. One another argument is that clang-format works better. I've tested astyle config with different styles and seems like it's not working as strictly as clang-format. For examle it ignores (T foo) and ( T foo ), same for loops indention inside brackets, allows unaligned/aligned declarations and definitions combined and so on.
I've prepared .clang-format config file which match to current astyle as pretty as possible. I believe in that this is very useful code-quality improvements that will make further development easier and more comfortable.
One another option to improve code quality is using naming conventions described and code quality warnings in some general config file. There's tool from clang for this purpose - clang-tidy. Maybe it could be good idea to use one.
Sure, we can switch to clang-format. Just open a PR with the CI switching to that and the required fixes to address any of the issues it spots on the current codebase.
Introduce clang-format necessity
I want to propose using
clang-format
instead of (or with)astyle
code formatter dueastyle
seems rather dead than alive. Moreover lots of IDEs has built-inclang-format
, while CLion, for example has no even pluggable support ofastyle
. One another argument is that clang-format works better. I've testedastyle
config with different styles and seems like it's not working as strictly asclang-format
. For examle it ignores(T foo)
and( T foo )
, same for loops indention inside brackets, allows unaligned/aligned declarations and definitions combined and so on.I've prepared
.clang-format
config file which match to currentastyle
as pretty as possible. I believe in that this is very useful code-quality improvements that will make further development easier and more comfortable.Here's
.clang-format
config:Introduce clang-tidy necessity
One another option to improve code quality is using naming conventions described and code quality warnings in some general config file. There's tool from clang for this purpose - clang-tidy. Maybe it could be good idea to use one.
For example, naming conventions can described with readability-identifier-naming.
More about other configurations can be found here
The text was updated successfully, but these errors were encountered: