Hey Sacha! First of all, thanks for the LiliPond export pull request! I'm sure that this might be very useful for some people.
About the code formatting: This is a good idea, at least as a starting point for new files. And a good method to define the coding style to use. As you may have seen, Hydrogen uses slightly different styles and naming schemes for the gui and the backend. And of course, it began to spill from one area to the other :) I haven't tried the clang formatting tool yet, but it looks promising. So lets have a look at the options.. On 2015-12-19 19:47, Sacha Delanoue wrote: > These are the points where I have no idea I should behave when writing > code, see their description on > http://clang.llvm.org/docs/ClangFormatStyleOptions.html : > > - AccessModifierOffset: I found both use of value 0 and -4 in Hydrogen; 4 characters. > - AlignAfterOpenBracket: this case happens rarely, maybe with > DontAlign; Is this for function calls or definitions/declarations? The description of the property says nothing about it (and how it works in combination with BinPackArguments and BinPackParameters. > - AllowShortCaseLabelsOnASingleLine: only seen once in all Hydrogen; "False" -> readability > - AlwaysBreakTemplateDeclarations: no templates are used in Hydrogen; > - BreakBeforeBraces: inconsistent through Hydrogen; Yes, at the moment hydrogen uses breaks before braces after function definitions, but not after if statements. > - BinPackArguments and BinPackParameters See AlignAfterOpenBracket > - ColumnLimit: there seem to be no limit, but is it wanted? About "it is wanted": I don't know :) Lets stay with "0" (let the developers decide...). > - ConstructorInitializerIndentWidth We're using currently "1" a lot, if i'm not mistaken.. > - ContinuationIndentWidth No idea :) > - IndentCaseLabels: both found in Hydrogen True > - IndentWidth: since tab is used, the value is not very important; 4 > - KeepEmptyLinesAtTheStartOfBlocks: sometime fould, is it wanted? If a block is sth. that is separated via curly braces, then "false". > - MaxEmptyLinesToKeep: there a a lot of blank links in Hydrogen; 2 > - NamespaceIndentation: inconsistent though Hydrogen; NI_None > - PointerAlignment: all found in Hydrogen, mainly right "Right" > - SpaceBeforeParens: both Never and ControlStatements in Hydrogen; Lets try "SBPO_ControlStatements" > - SpacesInCStyleCastParentheses: both found; true > - SpacesInSquareBrackets: both found; I guess this is used often if there is a variable used between the brackets and not used for constants. I would say "true", but i'm afraid that array accesses with fixed indices will look strange. > - TabWidth: should be equal to IndentWidth; 4 > - UseTabs: always or only for indentation; I found that “alyaws” > settings causes often troubles Only for indentation. > > I do not know who can make the call for this choices. Maybe it is of no > importance and we can all mix up these. Let me know what you think > Maybe we should start with those settings and see how this works out. It's sometimes hard to come to a decision without having good examples :) Could you create an example configuration file and send it to the list? If someone has other opinions on the above mentioned settings, please speak up! Best regards, Sebastian ------------------------------------------------------------------------------ _______________________________________________ Hydrogen-devel mailing list Hydrogen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hydrogen-devel