ReSharper 2025.3 ヘルプ

Protobuf の EditorConfig プロパティ: スタイルのフォーマット

タブとインデント

インデントスタイル

プロパティ名:

indent_style , [resharper_]protobuf_indent_style

使用可能な値:

  • tab : タブ

  • space : スペース

例:

タブ

option a = { a { x: 1 } b { y: 2 } }

スペース

option a = { a { x: 1 } b { y: 2 } }

インデントサイズ

プロパティ名:

indent_size , [resharper_]protobuf_indent_size

使用可能な値:

整数

例:

値: 0

option a = { a { x: 1 } b { y: 2 } }

値: 1

option a = { a { x: 1 } b { y: 2 } }

値: 2

option a = { a { x: 1 } b { y: 2 } }

タブの幅

プロパティ名:

tab_width , [resharper_]protobuf_tab_width

使用可能な値:

整数

例:

値: 0

option a = { a { x: 1 } b { y: 2 } }

値: 1

option a = { a { x: 1 } b { y: 2 } }

値: 2

option a = { a { x: 1 } b { y: 2 } }

タブがインデントに使用されているときの整列方法

プロパティ名:

[resharper_]protobuf_alignment_tab_fill_style , [resharper_]alignment_tab_fill_style

使用可能な値:

  • use_spaces : スペースを使用する (任意のタブサイズで整列して見える)

  • use_tabs_only : タブのみを使用する (不正確)

  • optimal_fill : 最適な塗りつぶしのためにタブとスペースをミックス

結果のくぼみが大きすぎても位置合わせする

プロパティ名:

[resharper_]protobuf_allow_far_alignment , [resharper_]allow_far_alignment

Allow alignment even if construct is located too far to the right, more than 2/3 of `Hard wrap at` limit

使用可能な値:

true | false

スペース

コンマの後にオプション

プロパティ名:

[resharper_]protobuf_space_comma , [resharper_]space_comma

使用可能な値:

true | false

例:

true

message a { optional int32 a = 1 [default = 1, deprecated = true]; }

false

message a { optional int32 a = 1 [default = 1,deprecated = true]; }

フィールドとオプションの前後 =

プロパティ名:

[resharper_]protobuf_space_equals , [resharper_]space_equals

使用可能な値:

true | false

例:

true

message a { optional int32 a = 1 [default = 1, deprecated = true]; }

false

message a { optional int32 a=1 [default=1, deprecated=true]; }

前: 集約オプション

プロパティ名:

[resharper_]protobuf_space_colon_before , [resharper_]space_colon_before

使用可能な値:

true | false

例:

true

option a = { x : y, c : e };

false

option a = { x: y, c: e };

後: 集約オプション

プロパティ名:

[resharper_]protobuf_space_colon_after , [resharper_]space_colon_after

使用可能な値:

true | false

例:

true

option a = { x: y, c: e };

false

option a = { x:y, c:e };

インデントオプション

Curly 波括弧はオプションではありません

プロパティ名:

[resharper_]protobuf_not_options_braces[resharper_]protobuf_brace_style[resharper_]not_options_braces[resharper_]brace_style

使用可能な値:

  • 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

message a { optional int32 a = 1; message b { optional int32 c = 1; } }

end_of_line_no_space

message a{ optional int32 a = 1; message b{ optional int32 c = 1; } }

next_line

message a { optional int32 a = 1; message b { optional int32 c = 1; } }

next_line_shifted

message a { optional int32 a = 1; message b { optional int32 c = 1; } }

next_line_shifted_2

message a { optional int32 a = 1; message b { optional int32 c = 1; } }

オプションの集計値での Curly/pointy 波括弧

プロパティ名:

[resharper_]protobuf_options_braces[resharper_]protobuf_brace_style[resharper_]options_braces[resharper_]brace_style

使用可能な値:

  • 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

option a = { a { x: 1 } b { y: 2 } }

end_of_line_no_space

option a ={ a{ x: 1 } b{ y: 2 } }

next_line

option a = { a { x: 1 } b { y: 2 } }

next_line_shifted

option a = { a { x: 1 } b { y: 2 } }

next_line_shifted_2

option a = { a { x: 1 } b { y: 2 } }

空のブロックスタイル

プロパティ名:

[resharper_]protobuf_empty_block_style , [resharper_]empty_block_style

使用可能な値:

  • multiline : 異なる行

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

  • together_same_line : 一緒に同じ行に

例:

multiline

message a { }

together

message a {}

together_same_line

message a {}

ラッピングと切り捨て

次でハードラップ

プロパティ名:

max_line_length , [resharper_]protobuf_max_line_length

使用可能な値:

整数

その他

集約オプションで pointy 波括弧を使用する

プロパティ名:

[resharper_]protobuf_options_braces_pointy , [resharper_]options_braces_pointy

使用可能な値:

true | false

例:

true

option a = { value1 <> value2 <> };

false

option a = { value1 {} value2 {} };
2024 年 5 月 26 日