<table><tr><td style="">staniek accepted this revision.<br />staniek added inline comments.<br />This revision is now accepted and ready to land.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29327">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D29327#inline-169483">View Inline</a><span style="color: #4b4d51; font-weight: bold;">jfita</span> wrote in <span style="color: #4b4d51; font-weight: bold;">KDbSqlScanner.l:40</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">Sorry, did not know i could run clang-format on flex sources. Will use it next time.</p>

<p style="padding: 0; margin: 8px;">Do you have the correct .clang-format file, though? I tried clang-format with WebKit-based style but it resulted in massive changes to this file and other C++ sources i tried.</p>

<p style="padding: 0; margin: 8px;">Thank you.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Sorry, we should have it in the repo, I thing we never added it after splitting repositories.</p>

<p style="padding: 0; margin: 8px;">This is what I use at the moment:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">BasedOnStyle:  WebKit
Language:        Cpp
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignTrailingComments: false
AlignAfterOpenBracket: Align
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBraces: Linux
BreakBeforeBinaryOperators: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BinPackParameters: true
ColumnLimit:     100
ConstructorInitializerAllOnOneLineOrOnePerLine: true
#DerivePointerBinding: false
#ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: false
Standard:        Cpp11
IndentWidth:     4
TabWidth:        8
UseTab:          Never
BreakBeforeBraces: Linux
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false
SpacesInAngles:  false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
#SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4</pre></div>

<p style="padding: 0; margin: 8px;">Configure it this way</p>

<p style="padding: 0; margin: 8px;"><a href="https://phabricator.kde.org/F8308084" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">F8308084: image.png</a></p>

<p style="padding: 0; margin: 8px;">I realized quite recently there was added some automation: <a href="https://phabricator.kde.org/D24568" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D24568</a> but I'd prefer not to alter so many lines just for formatting.</p>

<p style="padding: 0; margin: 8px;">If we look af KF5 repos I think only few publish official clang-format, e.g. kactivities.git/.clang-format.</p>

<p style="padding: 0; margin: 8px;">I think settings I pasted above reflect it as well as <a href="https://community.kde.org/Policies/Frameworks_Coding_Style" class="remarkup-link" target="_blank" rel="noreferrer">https://community.kde.org/Policies/Frameworks_Coding_Style</a> not too loosely.</p>

<p style="padding: 0; margin: 8px;">Regarding clang-format for flex files, it's not 100% supported but the code we discuss sits between %{ and %} and that seems to get formatted properly using clang-format if you select correct block.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R15 KDb</div></div></div><br /><div><strong>BRANCH</strong><div><div>3.2</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29327">https://phabricator.kde.org/D29327</a></div></div><br /><div><strong>To: </strong>jfita, staniek, piggz<br /><strong>Cc: </strong>Kexi-Devel-list, barman, wicik, staniek<br /></div>