JetBrains Rider 2026.3 Help

C++ の EditorConfig プロパティ: 波括弧レイアウト

波括弧レイアウト

名前空間宣言

プロパティ名:

[resharper_]cpp_名前空間_宣言_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]名前空間_宣言_中括弧、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

namespace ns { void a(); }

end_of_line_no_space

namespace ns{ void a(); }

next_line

namespace ns { void a(); }

next_line_shifted

namespace ns { void a(); }

next_line_shifted_2

namespace ns { void a(); }

リンケージ仕様

プロパティ名:

[resharper_]cpp_リンケージ指定_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]リンケージ指定_中括弧、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

extern "C++" { void a(); }

end_of_line_no_space

extern "C++"{ void a(); }

next_line

extern "C++" { void a(); }

next_line_shifted

extern "C++" { void a(); }

next_line_shifted_2

extern "C++" { void a(); }

エクスポート宣言

プロパティ名:

[resharper_]cpp_エクスポート_宣言_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]エクスポート_宣言_中括弧、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

export { void a(); }

end_of_line_no_space

export{ void a(); }

next_line

export { void a(); }

next_line_shifted

export { void a(); }

next_line_shifted_2

export { void a(); }

型宣言

プロパティ名:

[resharper_]cpp_型_宣言_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]type_declaration_braces、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

class C { public: void a(); };

end_of_line_no_space

class C{ public: void a(); };

next_line

class C { public: void a(); };

next_line_shifted

class C { public: void a(); };

next_line_shifted_2

class C { public: void a(); };

名前空間定義を同じ行に配置する

プロパティ名:

[resharper_]cpp_名前空間_定義_同じ行に配置, [resharper_]名前空間_定義_同じ行に配置

可能な値:

真 | 偽

例:

真

namespace A { namespace B { void a(); }}

false

namespace A { namespace B { void a(); } }

関数宣言

プロパティ名:

[resharper_]cpp_呼び出し可能_宣言_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]invocable_declaration_braces、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

void a() { b(); }

end_of_line_no_space

void a(){ b(); }

next_line

void a() { b(); }

next_line_shifted

void a() { b(); }

next_line_shifted_2

void a() { b(); }

ラムダ式

プロパティ名:

[resharper_]cpp_匿名_メソッド_宣言_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]anonymous_method_declaration_braces、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

auto a = []() { int x = 0; return x; };

end_of_line_no_space

auto a = [](){ int x = 0; return x; };

next_line

auto a = []() { int x = 0; return x; };

next_line_shifted

auto a = []() { int x = 0; return x; };

next_line_shifted_2

auto a = []() { int x = 0; return x; };

'case' ラベル下のブロック

プロパティ名:

[resharper_]cpp_case_ブロック_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]case_block_braces、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

switch (expression) { case 0: { foo(); break; } }

end_of_line_no_space

switch (expression) { case 0: { foo(); break; } }

next_line

switch (expression) { case 0: { foo(); break; } }

next_line_shifted

switch (expression) { case 0: { foo(); break; } }

next_line_shifted_2

switch (expression) { case 0: { foo(); break; } }

要求式

プロパティ名:

[resharper_]cpp_requires_式_中括弧, [resharper_]requires_式_中括弧

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

template <typename T> concept C = requires { typename T::inner1; typename T::inner2; };

end_of_line_no_space

template <typename T> concept C = requires{ typename T::inner1; typename T::inner2; };

next_line

template <typename T> concept C = requires { typename T::inner1; typename T::inner2; };

next_line_shifted

template <typename T> concept C = requires { typename T::inner1; typename T::inner2; };

next_line_shifted_2

template <typename T> concept C = requires { typename T::inner1; typename T::inner2; };

その他のステートメントとブロック

プロパティ名:

[resharper_]cpp_その他_中括弧、 [resharper_] C++ の波括弧スタイル、 [resharper_]other_braces、 [resharper_]波括弧スタイル

可能な値:

  • end_of_line: 行末 (K&R スタイル)

  • end_of_line_no_space: 行末 (空白なし)

  • next_line: 次の行に (BSD スタイル)

  • next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)

  • next_line_shifted_2: 次の行インデント 2 (GNU スタイル)

例:

end_of_line

if (condition) { foo(); } else { foo(); }

end_of_line_no_space

if (condition){ foo(); } else{ foo(); }

next_line

if (condition) { foo(); } else { foo(); }

next_line_shifted

if (condition) { foo(); } else { foo(); }

next_line_shifted_2

if (condition) { foo(); } else { foo(); }

その他の波括弧

プロパティ名:

[resharper_]cpp_式_中括弧, [resharper_]式_中括弧

可能な値:

  • 内部: 括弧内 (BSD/K&R スタイル)

  • 外側: 括弧内と等しく (ホワイトスミススタイル)

  • outside_and_inside: 括弧 1x、2x の内側 (GNU スタイル)

  • なし: インデントしない

例:

内部

int a[10] = { 1, 2, 3 };

外側

int a[10] = { 1, 2, 3 };

outside_and_inside

int a[10] = { 1, 2, 3 };

なし

int a[10] = { 1, 2, 3 };

空の中括弧のフォーマット

プロパティ名:

[resharper_]cpp_空_ブロック_スタイル, [resharper_]empty_block_style

可能な値:

  • multiline: 異なる行

  • together: 波括弧を一緒に配置する

  • together_same_line: 一緒に同じ行に

例:

multiline

class C { }; void foo() { for (;;) { } }

together

class C {}; void foo() { for (;;) {} }

together_same_line

class C {}; void foo() { for (;;) {} }

単純な複合文を 1 行にまとめる

プロパティ名:

[resharper_]cpp_単純_ブロック_スタイル, [resharper_]単純_ブロック_スタイル

可能な値:

  • do_not_change: 変更しない

  • on_single_line: 強制的に 1 行に入れる

  • line_break: 強制改行

例:

do_not_change

int foo() { return 0; }

on_single_line

int foo() { return 0; }

line_break

int foo() { return 0; }

ブロックを開始するマクロの正規表現

プロパティ名:

[resharper_]cpp_マクロ_ブロック_開始, [resharper_]マクロ_ブロック_開始

ブロックを終了するマクロの正規表現

プロパティ名:

[resharper_]cpp_マクロ_ブロック_終了, [resharper_]マクロ_ブロック_終了

'{' の後のコメントを許可する

プロパティ名:

[resharper_]cpp_左中括弧_後_コメント_許可, [resharper_]allow_comment_after_lbrace

可能な値:

真 | 偽

例:

真

if (condition) { // comment statement; }

false

if (condition) { // comment statement; }
2026 年 11 月 6 日