2015-11-05 12 views
13

के समापन के बीच खाली लाइन मैं बजना-स्वरूप का उपयोग हमारे सी ++ कोड फ़ॉर्मेट करने के लिए।बजना प्रारूप: वर्ग घोषणा के अंत और एक नाम स्थान

namespace Foo { 

class Bar { 
}; 

} 

लेकिन बजना-प्रारूप इस के लिए मेरे कोड में परिवर्तन:

namespace Foo { 

class Bar { 
}; 
} 

यह निकालता है मैं कक्षा घोषणा के बीच एक खाली पंक्ति और इतने की तरह आसपास के नाम स्थान के समापन ब्रेस करना चाहते हैं वर्ग घोषणा और नाम स्थान के समापन ब्रेस के बीच खाली पंक्ति।

मेरा प्रश्न: क्या बजना प्रारूप खाली पंक्ति को हटाने को रोकने के लिए कोई तरीका है?

यह मेरे वर्तमान बजना प्रारूप विन्यास है:

Language: Cpp 
AccessModifierOffset: -4 
AlignAfterOpenBracket: true 
AlignConsecutiveAssignments: false 
AlignEscapedNewlinesLeft: false 
AlignOperands: false 
AlignTrailingComments: false 
AllowAllParametersOfDeclarationOnNextLine: true 
AllowShortBlocksOnASingleLine: false 
AllowShortCaseLabelsOnASingleLine: false 
AllowShortFunctionsOnASingleLine: false 
AllowShortIfStatementsOnASingleLine: false 
AllowShortLoopsOnASingleLine: false 
AlwaysBreakAfterDefinitionReturnType: None 
AlwaysBreakBeforeMultilineStrings: true 
AlwaysBreakTemplateDeclarations: true 
BinPackArguments: true 
BinPackParameters: true 
BreakBeforeBinaryOperators: None 
BreakBeforeBraces: Attach 
BreakBeforeTernaryOperators: false 
BreakConstructorInitializersBeforeComma: false 
ColumnLimit: 80 
CommentPragmas: '^ IWYU pragma:' 
ConstructorInitializerAllOnOneLineOrOnePerLine: true 
ConstructorInitializerIndentWidth: 0 
ContinuationIndentWidth: 4 
Cpp11BracedListStyle: true 
DerivePointerAlignment: true 
DisableFormat: false 
ExperimentalAutoDetectBinPacking: false 
ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH] 
IndentCaseLabels: false 
IndentWidth: 4 
IndentWrappedFunctionNames: false 
KeepEmptyLinesAtTheStartOfBlocks: false 
MacroBlockBegin: '' 
MacroBlockEnd: '' 
MaxEmptyLinesToKeep: 1 
NamespaceIndentation: None 
ObjCBlockIndentWidth: 4 
ObjCSpaceAfterProperty: true 
ObjCSpaceBeforeProtocolList: true 
PenaltyBreakBeforeFirstCallParameter: 1 
PenaltyBreakComment: 300 
PenaltyBreakFirstLessLess: 120 
PenaltyBreakString: 1000 
PenaltyExcessCharacter: 1000000 
PenaltyReturnTypeOnItsOwnLine: 200 
PointerAlignment: Left 
SpaceAfterCStyleCast: false 
SpaceBeforeAssignmentOperators: true 
SpaceBeforeParens: ControlStatements 
SpaceInEmptyParentheses: false 
SpacesBeforeTrailingComments: 4 
SpacesInAngles: false 
SpacesInCStyleCastParentheses: false 
SpacesInContainerLiterals: false 
SpacesInParentheses: false 
SpacesInSquareBrackets: false 
Standard: Cpp11 
TabWidth: 4 
UseTab: Never 

उत्तर

9

मैं एक तरह से वैकल्पिक हल के लिए मिला इस: इस प्रकार है, अपने नाम स्थान समापन ब्रेस के लिए एक इनलाइन टिप्पणी जोड़ें:

namespace my_namespace { 

class MyClass { 
    int n; 
}; 

} // namespace my_namespace 
संबंधित मुद्दे