Re: clang-format syntax

On Sun, 2016-02-14 at 17:15 +0100, Kjell Ahlstedt wrote:
This is my proposal:

  BasedOnStyle: Mozilla
  Standard: Cpp11
  AlignAfterOpenBracket: false
  AlignEscapedNewlinesLeft: true
  AlwaysBreakAfterDefinitionReturnType: None
  BreakBeforeBraces: Allman
  ColumnLimit: 100
  IndentCaseLabels: false

The differences from your patch is that I've added

  AlignEscapedNewlinesLeft: true
  AlwaysBreakAfterDefinitionReturnType: None
  ColumnLimit: 100
  IndentCaseLabels: false

and removed

  SpaceBeforeParens: Never

These differences are not important to me. I can accept most
formatting rules. Consistent formatting is important, but the exact
rules are not.

OK. That's fine.

I wonder if we can avoid the odd comma placement here:

-: m_RunButton("Run"),
-  m_TextWidget_Info(false),
-  m_TextWidget_Source(true)
+  : m_RunButton("Run")
+  , m_TextWidget_Info(false)
+  , m_TextWidget_Source(true)

And I prefer the : without the indent, but I guess it's not that

And I would like the second line here to be indented:

+      list_file.push_back( MenuElem("_New", "<control>N",
+    &Example_AppWindow::on_menu_item)) );

A rule that I do dislike is the kind of double indentation used in
glib and gtk+.

  if (is_doable) // NOT my favorite format


Me too, along with their awful mix of tabs and spaces.

Murray Cumming
murrayc murrayc com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]