intel / intel/confidential-computing.sgx

Improve code formatting by introducing clang-format

Open
#742 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.5k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

This problem has been talked about several times ( #326 #433 ), but no updates.
Using some scripts, I tried my best to find a `.clang-format` that make minimum changes to this project, but it affects many files and lines.

``` yaml
BasedOnStyle: WebKit
Language: Cpp
IndentWidth: 4
ColumnLimit: 120
TabWidth: 4
AlignAfterOpenBracket: Align
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: InlineOnly
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: 'Yes'
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Stroustrup
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeComma
BreakStringLiterals: false
Cpp11BracedListStyle: true
DerivePointerAlignment: true
IndentGotoLabels: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ReflowComments: false
SortIncludes: false
SpaceBeforeCpp11BracedList: false
SpaceInEmptyBlock: false
Standard: Auto
```

But this is still to be discussed whether to introduce clang-format and use what kind of specification.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.