一般化された EditorConfig プロパティ
このトピックに記載されている各 EditorConfig プロパティでは、一度に複数の同様のプロパティを設定できます。
例: if、while、catch の括弧の前にスペースを使用するかどうかを設定できる、かなりきめ細かいプロパティがいくつかあります。これらの同様のプロパティを個別に設定する必要がない場合は、対応する一般化プロパティ(この場合は [resharper_]space_after_keywords_in_control_flow_statements)を使用できます。
波括弧レイアウトスタイル
プロパティ名:
[resharper_]brace_style
言語固有のエイリアス:
[resharper_]csharp_brace_style、[resharper_]protobuf_brace_style、[resharper_]js_brace_style、[resharper_]css_brace_style、[resharper_]cpp_brace_style、[resharper_]shaderlab_brace_style
次のプロパティを設定できます。
使用可能な値:
end_of_line: 行末 (K&R スタイル)end_of_line_no_space: 行末 (空白なし)next_line: 次の行に (BSD スタイル)next_line_shifted: 次の行のインデント時に (ホワイトスミススタイル)next_line_shifted_2: 次の行インデント 2 (GNU スタイル)pico: コンパクト (ピコスタイル)
類似のコードを列に整列する
プロパティ名:
[resharper_]int_align
言語固有のエイリアス:
[resharper_]csharp_int_align
次のプロパティを設定できます。
使用可能な値:
true | false
既存のコードの手配を維持する (単一行 / 複数行)
プロパティ名:
[resharper_]keep_existing_arrangement
言語固有のエイリアス:
[resharper_]csharp_keep_existing_arrangement
次のプロパティを設定できます。
使用可能な値:
true | false
単純なブロックを 1 行に配置する
プロパティ名:
[resharper_]place_simple_blocks_on_single_line
言語固有のエイリアス:
[resharper_]csharp_place_simple_blocks_on_single_line
次のプロパティを設定できます。
使用可能な値:
true | false
単純な型メンバーのブロックを 1 行に配置する
プロパティ名:
[resharper_]place_simple_declaration_blocks_on_single_line
言語固有のエイリアス:
[resharper_]csharp_place_simple_declaration_blocks_on_single_line
次のプロパティを設定できます。
使用可能な値:
true | false
単純属性を所有者と同じ行に配置する
プロパティ名:
[resharper_]place_attribute_on_same_line
言語固有のエイリアス:
[resharper_]csharp_place_attribute_on_same_line
次のプロパティを設定できます。
使用可能な値:
false: なしnever: なしif_owner_is_single_line: 所有者がシングルラインの場合true: 常時always: 常時
単項演算子の後のスペース (!, -, ~,...)
プロパティ名:
[resharper_]space_after_unary_operator
言語固有のエイリアス:
[resharper_]csharp_space_after_unary_operator、[resharper_]vb_space_after_unary_operator、[resharper_]cpp_space_after_unary_operator
次のプロパティを設定できます。
使用可能な値:
true | false
コンマの後のスペース
プロパティ名:
[resharper_]space_after_comma
言語固有のエイリアス:
csharp_space_after_comma、[resharper_]vb_space_after_comma、[resharper_]js_space_after_comma、[resharper_]css_space_after_comma、[resharper_]cpp_space_after_comma
次のプロパティを設定できます。
使用可能な値:
true | false
三項演算子の周囲のスペース (?, :)
プロパティ名:
[resharper_]space_around_ternary_operator
言語固有のエイリアス:
[resharper_]csharp_space_around_ternary_operator
次のプロパティを設定できます。
使用可能な値:
true | false
バイナリ演算子の周囲のスペース (+, | |, =, ...)
プロパティ名:
[resharper_]space_around_binary_operator
言語固有のエイリアス:
[resharper_]csharp_space_around_binary_operator、[resharper_]vb_space_around_binary_operator、[resharper_]js_space_around_binary_operator、[resharper_]cpp_space_around_binary_operator
次のプロパティを設定できます。
使用可能な値:
true | false
メンバーアクセスオペレータの周囲のスペース (、- >、...)
プロパティ名:
[resharper_]space_around_member_access_operator
言語固有のエイリアス:
[resharper_]csharp_space_around_member_access_operator、[resharper_]vb_space_around_member_access_operator、[resharper_]js_space_around_member_access_operator、[resharper_]cpp_space_around_member_access_operator
次のプロパティを設定できます。
使用可能な値:
true | false
括弧の前のスペース
プロパティ名:
[resharper_]space_before_open_square_brackets
言語固有のエイリアス:
csharp_space_before_open_square_brackets、[resharper_]js_space_before_open_square_brackets、[resharper_]cpp_space_before_open_square_brackets
次のプロパティを設定できます。
使用可能な値:
true | false
制御フローステートメントの括弧の前のスペース
プロパティ名:
[resharper_]space_after_keywords_in_control_flow_statements
言語固有のエイリアス:
csharp_space_after_keywords_in_control_flow_statements、[resharper_]js_space_after_keywords_in_control_flow_statements、[resharper_]cpp_space_after_keywords_in_control_flow_statements
次のプロパティを設定できます。
使用可能な値:
true | false
コンマの前のスペース
プロパティ名:
[resharper_]space_before_comma
言語固有のエイリアス:
csharp_space_before_comma、[resharper_]vb_space_before_comma、[resharper_]js_space_before_comma、[resharper_]css_space_before_comma、[resharper_]cpp_space_before_comma
次のプロパティを設定できます。
使用可能な値:
true | false
メソッド呼び出し括弧の前のスペース
プロパティ名:
[resharper_]space_between_method_call_name_and_opening_parenthesis
言語固有のエイリアス:
csharp_space_between_method_call_name_and_opening_parenthesis、[resharper_]js_space_between_method_call_name_and_opening_parenthesis、[resharper_]cpp_space_between_method_call_name_and_opening_parenthesis
次のプロパティを設定できます。
使用可能な値:
true | false
メソッド宣言括弧の前のスペース
プロパティ名:
[resharper_]space_between_method_declaration_name_and_open_parenthesis
言語固有のエイリアス:
csharp_space_between_method_declaration_name_and_open_parenthesis、[resharper_]js_space_between_method_declaration_name_and_open_parenthesis、[resharper_]cpp_space_between_method_declaration_name_and_open_parenthesis
次のプロパティを設定できます。
使用可能な値:
true | false
括弧内のスペース
プロパティ名:
[resharper_]space_between_square_brackets
言語固有のエイリアス:
csharp_space_between_square_brackets、[resharper_]js_space_between_square_brackets、[resharper_]cpp_space_between_square_brackets
次のプロパティを設定できます。
使用可能な値:
true | false
制御フローステートメントの括弧内のスペース
プロパティ名:
[resharper_]space_between_parentheses_of_control_flow_statements
言語固有のエイリアス:
[resharper_]csharp_space_between_parentheses_of_control_flow_statements、[resharper_]js_space_between_parentheses_of_control_flow_statements、[resharper_]cpp_space_between_parentheses_of_control_flow_statements
次のプロパティを設定できます。
使用可能な値:
true | false
ConfigureAwait 分析モード
プロパティ名:
[resharper_]configure_await_analysis_mode
言語固有のエイリアス:
次のプロパティを設定できます。
使用可能な値:
disabledlibraryui
関連ページ:
EditorConfig を使用する
ReSharper は、EditorConfig 形式で定義されたコード形式スタイル、コード構文スタイル、C# の命名スタイル、コードインスペクション重大度レベルをサポートします。まず、この 2 分間の概要ビデオを見て、Matt Ellis が EditorConfig を使用してフォーマットルールの構成全体を維持するのに ReSharper がどのように役立つかを説明します。EditorConfig とは何ですか? ReSharper はどのようにそれを拡張しますか? :EditorConfig...
C# の EditorConfig プロパティ: 波括弧レイアウト
このページでは、C# でフォーマット設定を構成するために使用できるカスタム ReSharperEditorConfig プロパティをリストします。具体的には、ReSharper が新しいコードを生成して既存のコードを再フォーマットするときにブレースを配置する方法です。特に、または演算子の後にブレースを配置する方法はいくつかあります。波括弧レイアウト:型と名前空間の宣言プロパティ名:、、使用可能な値:: 行末 (K&R スタイル)、: 行末 (空白なし)、: 次の行に (BSD スタイル)、:...