Open bp0 opened 7 years ago
i have a pull #94 that said 4 spaces for identation, will be or 8 or other? will be a mixure of or only SPACES?
I use 4, but whatever looks nice where it is used. If the pyramid is getting big, perhaps only use 2 for that block. Doesn't need to be a hard rule.
Might be better to just use clang-format
throghout.
so well? clang-format have several style options, might be difficult to determine prefered.. https://clang.llvm.org/docs/ClangFormatStyleOptions.html
due that you can put after merged or here what might be in the CONTRIBUTING.md file of pull #95
clang-format is kindof nice, but there are a couple problems with hardinfo. For example: https://github.com/lpereira/hardinfo/blob/master/modules/devices/x86/processor.c#L386 clang-format squishes it all into one giant block of parameters to the printf.
I think clang-format could be useful, but I don't think running it on the whole tree is a good idea.
Here is a candidate .clang-format
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 100
TabWidth: 8
UseTab: Never
AlignEscapedNewlines: Left
AlwaysBreakAfterReturnType: None
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
jaja that's geany right?
well in my pull's now i'll use 4 spaces for identation and the clang-format columnwith 100 and AllowShortBlocksOnASingleLine but my "if-else" always be not singleline due consistence coding, i think no problem for us that due are not so dangerous to eyes!
As mentioned in #33 (a conversation that went way off-topic), the code uses a mix of spaces and tabs for indentation. I prefer spaces, so I've been using spaces in all new code, and converting old code that I edit.
Status
Checked means cleaned. Uses all spaces (or tabs, but not a mix) for indentation; has no whitespace on empty lines. (as of 8e4746423c20b525671998b1bc94b3b6d8ec78d6)