Replies: 1 comment 1 reply
-
Yeah, why not! Sounds reasonable to me. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would it be okay to add a linter / formatter config and CI for the lib and its examples?
It would allow running format on save to follow a unifrom code style and take away the mental overhead of this automatable formatting task. A simple github workflow would ensure it's followed.
For indentation I recommend using tabs, as they have better accessibility. Among the things that are not possible with spaces are that tabs adapt to the indent-width that a developer has configured. Also, the width could be change on the fly - without making a change to the code-base (e.g. when working with splits or in deeply nested code). Tabs are the default for e.g. Go, V, the Linux Kernel, also prettier(probably themost commonly used formatter for several languages) is about to make tabs the default prettier/prettier#7475.
webui-tabs.mov
For C formatting I would add a
.clang-format
config. With clang it's possible the achieve the optimum for C code base, as it can use white space characters optimally - tabs for indentation spaces for alignment. E.g. the following example formatted by clangd:Beta Was this translation helpful? Give feedback.
All reactions