I'm trying format one c header file. While struct
idents is equals to class variables.
test.h:
class MyClass{
public:
int var;
int var2;
}
struct myst {
int foo;
int bar;
};
Style Config:
TabWidth: 4
IndentWidth: 4
UseTab: Always
IndentAccessModifiers: true
Run:
clang-format -style="{TabWidth: 4, IndentWidth: 4, UseTab: Always, IndentAccessModifiers: true}" test.h
The following output is bad. (in struct
is must be one tab not more!)
class MyClass {
public:
int var;
int var2;
}
struct myst {
int foo;
int bar;
};
Also like this output:
class MyClass {
public:
int var;
int var2;
}
struct myst {
int foo;
int bar;
};