LoginSignup
14
13

More than 5 years have passed since last update.

Uncrustifyのセッティング (10) 空白編

Posted at

多すぎる。。。

項目 設定
sp_arith 算術演算子 '+'、'-'、'/'、'*'等の前後に空白を挿入/削除する { ignore, add, remove, force }
sp_assign 代入演算子 '='、'+='等の前後に空白を挿入/削除する { number }
sp_cpp_lambda_assign C++11ラムダ式の外部変数キャプチャの'='演算子の前後に空白を挿入/削除する (sp_assignを上書き) { ignore, add, remove, force }
sp_cpp_lambda_paren C++11ラムダ式の変数キャプチャの']'と引数リストの'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_assign_default プロトタイプ宣言の'='の代入演算子の前後に空白を挿入/削除する { ignore, add, remove, force }
sp_before_assign '='、'+='等の代入演算子の前に空白を挿入/削除する (sp_assignを上書き) { ignore, add, remove, force }
sp_after_assign '=', '+='等の代入演算子の後に空白を挿入/削除する (sp_assignを上書き) { ignore, add, remove, force }
sp_enum_assign enumの'='代入演算子の前後に空白を挿入/削除する { ignore, add, remove, force }
sp_enum_before_assign enumの'='代入演算子の前に空白を挿入/削除する (sp_enum_assignを上書き) { ignore, add, remove, force }
sp_enum_after_assign enumの'='代入演算子の後に空白を挿入/削除する (sp_enum_assignを上書き) { ignore, add, remove, force }
sp_pp_concat プリプロセッサの'##'連結演算子の前後に空白を挿入/削除する (デフォルト: add) { ignore, add, remove, force }
sp_pp_stringify プリプロセッサの'#'文字列化演算子の後に空白を挿入/削除する ('#@'文字化演算子にも適用される) { ignore, add, remove, force }
sp_before_pp_stringify プリプロセッサの'#'文字列化演算子の前に空白を挿入/削除する (例: '#define x(y) L#y') { ignore, add, remove, force }
sp_bool '&&'と'
sp_compare '<'、'>'、'=='等の比較演算子の前後に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_paren '('と')'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_paren_paren 入れ子の括弧の間に空白を挿入/削除する { ignore, add, remove, force }
sp_balance_nested_parens 入れ子の括弧の内側の空白の数を同じにするか、しないか { ignore, add, remove, force }
sp_paren_brace ')'と'{'の間に空白を挿入/削除する { ignore, add, remove, force }
sp_before_ptr_star ポインタの'*'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_before_unnamed_ptr_star 変数名が後に続かないポインタの'*'の前に空白を挿入/削除する 'ignore'の場合、sp_before_ptr_starが代わりに使用される。 { ignore, add, remove, force }
sp_between_ptr_star ポインタの''と''の間に空白を挿入/削除する { ignore, add, remove, force }
sp_after_ptr_star 単語が続く場合、ポインタの'*'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_after_ptr_star_func 関数のプロトタイプ宣言や定義が続く場合、ポインタの'*'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_ptr_star_paren (関数型の)開丸括弧が続く場合、ポインタの'*'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_before_ptr_star_func 関数のプロトタイプ宣言や定義が続く場合、ポインタの'*'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_before_byref 参照の'&'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_before_unnamed_byref 変数名が後に続かない参照の'&'の前に空白を挿入/削除する 'ignore'の場合、sp_before__byrefが代わりに使用される。 { ignore, add, remove, force }
sp_after_byref 単語が続く場合、参照の'&'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_after_byref_func 関数のプロトタイプ宣言や定義が続く場合、参照の'&'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_before_byref_func 関数のプロトタイプ宣言や定義が続く場合、参照の'&'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_after_type 型と単語の間に空白を挿入/削除する (デフォルト: force) { ignore, add, remove, force }
sp_before_template_paren D言語のテンプレート ('template Foo('と'class Foo(') において、丸括弧の前に空白を挿入/削除する { ignore, add, remove, force }
sp_template_angle 'template'と'<'の間に空白を挿入/削除する ignoreの場合、sp_before_angleが使用される。 { ignore, add, remove, force }
sp_before_angle '<>'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_angle '<'と'>'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_after_angle '<>'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_angle_paren 'new List();'のように、'<>'と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_angle_word 'List m;'のように、'<>'と単語の間に空白を挿入/削除する { ignore, add, remove, force }
sp_angle_shift '>>'の'>'と'>'の間に空白を挿入/削除する (C++/C#のテンプレート関連のみ) (デフォルト: add) { ignore, add, remove, force }
sp_permit_cpp11_shift 'foo >'の'> >'の間の空白の削除を許可する (C++11のみ) (デフォルト: false) このオプションなしで、sp_angle_shiftは空白を削除できない。 { ignore, add, remove, force }
sp_before_sparen 'if'、'for'、'switch'、'while'の'('の前に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_sparen if条件の'('と')'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_sparen_close if条件の')'の前に空白を挿入/削除する (sp_inside_sparenを上書き) { ignore, add, remove, force }
sp_inside_sparen_open if条件の'('の後に空白を挿入/削除する (sp_inside_sparenを上書き) { ignore, add, remove, force }
sp_after_sparen 'if'、'for'、'switch'、'while'の')'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_sparen_brace 'if'、'for'、'switch'、'while'の')'と'{'の間に空白を挿入/削除する { ignore, add, remove, force }
sp_invariant_paren 'invariant'と'('の間に空白を追加/削除する (D言語) { ignore, add, remove, force }
sp_after_invariant_paren 'invariant (C) c'の')'の後に空白を追加/削除する (D言語) { ignore, add, remove, force }
sp_special_semi 'if'、'for'、'while'と同じ行の';'のみの空のステートメントの前に空白を挿入/削除する { ignore, add, remove, force }
sp_before_semi ';'の前に空白を挿入/削除する (デフォルト: remove) { ignore, add, remove, force }
sp_before_semi_for 空でない'for'文の';'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_before_semi_for_empty 'for'文の空のパートの';'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_after_semi コメントが後に続く場合を除いて、';'の後の空白を挿入/削除する (デフォルト: add) { ignore, add, remove, force }
sp_after_semi_for 空でない'for'文の';'の後に空白を挿入/削除する (デフォルト: force) { ignore, add, remove, force }
sp_after_semi_for_empty 'for'文の空のパートの最後のセミコロンの後に空白を挿入/削除する (for ( ; ; )) { ignore, add, remove, force }
sp_before_square '['の前に空白を挿入/削除する ('[]'以外) { ignore, add, remove, force }
sp_before_squares '[]'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_square 空でない'['と']'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_after_comma ','の後に空白を挿入/削除する { ignore, add, remove, force }
sp_before_comma ','の前に空白を挿入/削除する { ignore, add, remove, force }
sp_paren_comma 開丸括弧とカンマの間に空白を挿入/削除する ('(,'と'( ,') { ignore, add, remove, force }
sp_before_ellipsis 可変パラメータの'...'の前に空白を挿入/削除する (非句点が先行している時) { ignore, add, remove, force }
sp_after_class_colon 'class'の':'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_before_class_colon 'class'の':'の前に空白を挿入/削除する { ignore, add, remove, force }
sp_before_case_colon 'case'の':'の前に空白を挿入/削除する (デフォルト: remove) { ignore, add, remove, force }
sp_after_operator 'operator'と演算子記号の間に空白を挿入/削除する { ignore, add, remove, force }
sp_after_operator_sym オペレータシンボルと開丸括弧の間に空白を挿入/削除する (operator ++()) { ignore, add, remove, force }
sp_after_cast キャストの後に空白を挿入/削除する (C言語/D言語) ('cast(int)a' vs 'cast(int) a'、'(int)a' vs '(int) a') { ignore, add, remove, force }
sp_inside_paren_cast キャストの括弧の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_cpp_cast_paren キャストの型と開丸括弧の間に空白を挿入/削除する (C++言語) ('int(exp)' vs 'int (exp)') { ignore, add, remove, force }
sp_sizeof_paren 'sizeof'と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_after_tag タグキーワードの後に空白を挿入/削除する (Pawn) { ignore, add, remove, force }
sp_inside_braces_enum enumの'{'と'}'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_braces_struct struct/unionの'{'と'}'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_braces '{'と'}'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_braces_empty '{}'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_type_func 戻り値の型と関数名の間に空白を挿入/削除する ポインタ型の戻り値を除いて、最低でも空白1文字が強制的に挿入される。 { ignore, add, remove, force }
sp_func_proto_paren 関数宣言の関数名と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_func_def_paren 関数定義の関数名と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_fparens 空の関数'()'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_fparen 関数の'('と')'の内側に空白を挿入/削除する { ignore, add, remove, force }
sp_inside_tparen 関数タイプの最初の括弧の内側に空白を挿入/削除する ('void (*x)(...)') { ignore, add, remove, force }
sp_after_tparen_close 関数タイプの括弧どうしの間に空白を挿入/削除する ('void (*x)(...)') { ignore, add, remove, force }
sp_square_fparen 関数コールパートで、']'と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_fparen_brace 関数の')'と'{'の間に空白を挿入/削除する { ignore, add, remove, force }
sp_func_call_paren 関数コールで関数名と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_func_call_paren_empty パラメータなしの関数コールで関数名と'()'の間に空白を挿入/削除する 'ignore'の場合、sp_func_call_parenが使用される。 { ignore, add, remove, force }
sp_func_call_user_paren 関数コールでユーザ関数名と'('の間に空白を挿入/削除する 設定ファイルの中に'set func_call_user _'のように、ユーザ関数であることであるキーワードを設定する必要がある。 { ignore, add, remove, force }
sp_func_class_paren コンストラクタ/デストラクタと開丸括弧の間に空白を挿入/削除する { ignore, add, remove, force }
sp_return_paren 'return'と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_attribute_paren 'attribute'と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_defined_paren '#if defined (FOO)'の'defined'と'('の間に空白を挿入/削除する { ignore, add, remove, force }
sp_throw_paren 'throw'と'('の間に空白を挿入/削除する ('throw (something)') { ignore, add, remove, force }
sp_after_throw 'throw'と'('以外の文字の間に空白を挿入/削除する ('@throw [...]') { ignore, add, remove, force }
sp_catch_paren 'catch'と'('の間に空白を挿入/削除する ('catch (something) { }') ignoreの場合、sp_before_sparenが使用される。 { ignore, add, remove, force }
sp_version_paren 'version'と'('の間に空白を挿入/削除する ('version (something) { }') (D言語) ignoreの場合、sp_before_sparenが使用される。 { ignore, add, remove, force }
sp_scope_paren 'scope'と'('の間に空白を挿入/削除する ('scope (something) { }') (D言語) ignoreの場合、sp_before_sparenが使用される。 { ignore, add, remove, force }
sp_macro マクロと値の間に空白を挿入/削除する { ignore, add, remove, force }
sp_macro_func マクロ関数の')'と値の間に空白を挿入/削除する { ignore, add, remove, force }
sp_else_brace 一行に'else'と'{'がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_brace_else 一行に'}'と'else'がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_brace_typedef 一行に'}'とtypedefの型名がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_catch_brace 一行に'catch'と'{'がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_brace_catch 一行に'}'と'catch'がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_finally_brace 一行に'finally'と'{'がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_brace_finally 一行に'}'と'finally'がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_try_brace 一行に'try'と'{'がある場合、間に空白を挿入/削除する { ignore, add, remove, force }
sp_getset_brace 一行に'get'/'set'と'{'がある場合、間に空白を挿入/削除する { false, true }
sp_before_dc '::'演算子の前に空白を挿入/削除する { ignore, add, remove, force }
sp_after_dc '::'演算子の後に空白を挿入/削除する { ignore, add, remove, force }
sp_d_array_colon 名前付き配列イニシャライザ':'の前後に空白を挿入/削除する (D言語) { ignore, add, remove, force }
sp_not '!' (not) 演算子の後に空白を挿入/削除する (デフォルト: remove) { ignore, add, remove, force }
sp_inv '~' (invert) 演算子の後に空白を挿入/削除する (デフォルト: remove) { ignore, add, remove, force }
sp_addr アドレス演算子'&'の後に空白を挿入/削除する (デフォルト: remove) 参照型の一部である'&'の後のスペーシングには影響しない。 { ignore, add, remove, force }
sp_member '.'や'->'演算子の前後に空白を挿入/削除する (デフォルト: remove) { ignore, add, remove, force }
sp_deref '' (dereference) 演算子の後に空白を挿入/削除する (デフォルト: remove) ポインタ型の一部である''の後のスペーシングには影響しない。 { ignore, add, remove, force }
sp_sign 単項演算子'+'、'-'の後に空白を挿入/削除する ('x = -5'、'y = +7') (デフォルト: remove) { ignore, add, remove, force }
sp_incdec 単項演算子'++'、'--'の後に空白を挿入/削除する ('(--x)'、'y++;') (デフォルト: remove) { ignore, add, remove, force }
sp_before_nl_cont 行末のバックスラッシュ('\')-改行の前に空白を挿入/削除する (デフォルト: add) { ignore, add, remove, force }
sp_after_oc_scope スコープ定義'+'、'-'の後に空白を挿入/削除する ('-(void) foo;'、'+(int) bar;') (Objective-C言語) { ignore, add, remove, force }
sp_after_oc_colon メッセージ仕様宣言の':'の後に空白を挿入/削除する (Objective-C言語) ('-(int) f:(int) x;' vs '-(int) f: (int) x;') { ignore, add, remove, force }
sp_before_oc_colon メッセージ仕様宣言の':'の前に空白を挿入/削除する (Objective-C言語) ('-(int) f: (int) x;' vs '-(int) f : (int) x;') { ignore, add, remove, force }
sp_after_oc_dict_colon 不変ディクショナリ式における':'の後に空白を挿入/削除する (Objective-C言語) ('NSDictionary *test = @{@"foo" :@"bar"};') { ignore, add, remove, force }
sp_before_oc_dict_colon 不変ディクショナリ式における':'の前に空白を挿入/削除する (Objective-C言語) ('NSDictionary *test = @{@"foo" :@"bar"};') { ignore, add, remove, force }
sp_after_send_oc_colon メッセージ送信式の':'の後に空白を挿入/削除する (Objective-C言語) ('[object setValue:1];' vs '[object setValue: 1];') { ignore, add, remove, force }
sp_before_send_oc_colon メッセージ送信式の':'の前に空白を挿入/削除する (Objective-C言語) ('[object setValue:1];' vs '[object setValue :1];') { ignore, add, remove, force }
sp_after_oc_type メッセージ仕様宣言の(type)の後に空白を挿入/削除する (Objective-C言語) ('-(int)f: (int) x;' vs '-(int)f: (int)x;') { ignore, add, remove, force }
sp_after_oc_return_type メッセージ仕様宣言の最初の(type)の後に空白を挿入/削除する (Objective-C言語) ('-(int) f:(int)x;' vs '-(int)f:(int)x;') { ignore, add, remove, force }
sp_after_oc_at_sel '@selector'と'('の間に空白を挿入/削除する (Objective-C言語) ('@selector(msgName)' vs '@selector (msgName)') 同時に@protocol()ブロックにも提供される。 { ignore, add, remove, force }
sp_after_oc_at_sel_parens '@selector(x)'と続く単語の間に空白を挿入/削除する (Objective-C言語) ('@selector(foo) a:' vs '@selector(foo)a:') { ignore, add, remove, force }
sp_inside_oc_at_sel_parens '@selector'の丸括弧の内側に空白を挿入/削除する (Objective-C言語) ('@selector(foo)' vs '@selector( foo )') Also applies to @protocol() constructs { false, true }
sp_before_oc_block_caret ブロックポインタのキャレットの前に空白を挿入/削除する (Objective-C言語) ('^int (int arg){...}' vs. ' ^int (int arg){...}') { ignore, add, remove, force }
sp_after_oc_block_caret ブロックポインタのキャレットの後に空白を挿入/削除する (Objective-C言語) ('^int (int arg){...}' vs. '^ int (int arg){...}') { ignore, add, remove, force }
sp_after_oc_msg_receiver メッセージ内のレシーバとセレクタの間に空白を挿入/削除する (Objective-C言語) { ignore, add, remove, force }
sp_after_oc_property @propertyの後に空白を挿入/削除する (Objective-C言語) { ignore, add, remove, force }
sp_cond_colon 三項演算子の':'の前後に空白を挿入/削除する { ignore, add, remove, force }
sp_cond_question 三項演算子の'?'の前後に空白を挿入/削除する { ignore, add, remove, force }
sp_case_label 'case'とケースラベルの間のスペーシングを固定する ('ignore'と'force'のみ有効) { ignore, add, remove, force }
sp_range '..'演算子の前後に空白を挿入/削除する (D言語) { ignore, add, remove, force }
sp_after_for_colon 'for'分の':'の後に空白を挿入/削除する ('for (TYPE VAR : EXPR)') (Java言語) { ignore, add, remove, force }
sp_before_for_colon 'for'分の':'の前に空白を挿入/削除する ('for (TYPE VAR : EXPR)') (Java言語) { ignore, add, remove, force }
sp_extern_paren 'extern (C)'の'extern'と'('の間に空白を挿入/削除する (D言語) { ignore, add, remove, force }
sp_cmt_cpp_start C++コメントの開始の後に空白を挿入/削除する ('// A' vs '//A') { ignore, add, remove, force }
sp_endif_cmt '#else'もしくは'#endif'とそれに続くコメントの間に空白を挿入/削除する { ignore, add, remove, force }
sp_after_new 'new'、'delete'、'delete[]'の後に空白を挿入/削除する { ignore, add, remove, force }
sp_before_tr_emb_cmt 行末コメントもしくは文中コメントの前に空白を挿入/削除する { ignore, add, remove, force }
sp_num_before_tr_emb_cmt 行末コメントもしくは文中コメントの前に挿入する空白の数 { ignore, add, remove, force }
sp_annotation_paren Javaアノテーションと開丸括弧の間に空白を挿入/削除する (Java言語) { ignore, add, remove, force }
spacing.cfg
sp_arith                   = add
sp_assign                  = add
sp_cpp_lambda_assign       = remove
sp_cpp_lambda_paren        = remove
sp_assign_default          = add
sp_before_assign           = ignore
sp_after_assign            = ignore
sp_enum_assign             = add
sp_enum_before_assign      = ignore
sp_enum_after_assign       = ignore
sp_pp_concat               = add
sp_pp_stringify            = remove
sp_before_pp_stringify     = ignore
sp_bool                    = add
sp_compare                 = add
sp_inside_paren            = remove
sp_paren_paren             = remove
sp_balance_nested_parens   = false
sp_paren_brace             = add
sp_before_ptr_star         = remove
sp_before_unnamed_ptr_star = remove
sp_between_ptr_star        = remove
sp_after_ptr_star          = add
sp_after_ptr_star_func     = add
sp_ptr_star_paren          = add
sp_before_ptr_star_func    = remove
sp_before_byref            = remove
sp_before_unnamed_byref    = remove
sp_after_byref             = add
sp_after_byref_func        = add
sp_before_byref_func       = remove
sp_after_type              = add
sp_before_template_paren   = ignore
sp_template_angle          = force
sp_before_angle            = add
sp_inside_angle            = remove
sp_after_angle             = add
sp_angle_paren             = remove
sp_angle_word              = add
sp_angle_shift             = add
sp_permit_cpp11_shift      = false
sp_before_sparen           = add
sp_inside_sparen           = remove
sp_inside_sparen_close     = remove
sp_inside_sparen_open      = remove
sp_after_sparen            = add
sp_sparen_brace            = add
sp_invariant_paren         = ignore
sp_after_invariant_paren   = ignore
sp_special_semi            = add
sp_before_semi             = remove
sp_before_semi_for         = remove
sp_before_semi_for_empty   = ignore
sp_after_semi              = add
sp_after_semi_for          = force
sp_after_semi_for_empty    = ignore
sp_before_square           = remove
sp_before_squares          = remove
sp_inside_square           = remove
sp_after_comma             = remove
sp_before_comma            = remove
sp_paren_comma             = force
sp_before_ellipsis         = add
sp_after_class_colon       = add
sp_before_class_colon      = add
sp_before_case_colon       = remove
sp_after_operator          = remove
sp_after_operator_sym      = remove
sp_after_cast              = add
sp_inside_paren_cast       = remove
sp_cpp_cast_paren          = remove
sp_sizeof_paren            = remove
sp_after_tag               = ignore
sp_inside_braces_enum      = add
sp_inside_braces_struct    = add
sp_inside_braces           = add
sp_inside_braces_empty     = add
sp_type_func               = add
sp_func_proto_paren        = remove
sp_func_def_paren          = remove
sp_inside_fparens          = remove
sp_inside_fparen           = remove
sp_inside_tparen           = remove
sp_after_tparen_close      = remove
sp_square_fparen           = remove
sp_fparen_brace            = add
sp_func_call_paren         = remove
sp_func_call_paren_empty   = remove
sp_func_call_user_paren    = add
sp_func_class_paren        = remove
sp_return_paren            = remove
sp_attribute_paren         = remove
sp_defined_paren           = remove
sp_throw_paren             = remove
sp_after_throw             = add
sp_catch_paren             = add
sp_version_paren           = ignore
sp_scope_paren             = ignore
sp_macro                   = add
sp_macro_func              = add
sp_else_brace              = add
sp_brace_else              = add
sp_brace_typedef           = add
sp_catch_brace             = add
sp_brace_catch             = add
sp_finally_brace           = add
sp_brace_finally           = add
sp_try_brace               = add
sp_getset_brace            = add
sp_before_dc               = remove
sp_after_dc                = remove
sp_d_array_colon           = ignore
sp_not                     = remove
sp_inv                     = remove
sp_addr                    = remove
sp_member                  = remove
sp_deref                   = remove
sp_sign                    = remove
sp_incdec                  = remove
sp_before_nl_cont          = add
sp_after_oc_scope          = add
sp_after_oc_colon          = remove
sp_before_oc_colon         = remove
sp_after_oc_dict_colon     = add
sp_before_oc_dict_colon    = remove
sp_after_send_oc_colon     = remove
sp_before_send_oc_colon    = remove
sp_after_oc_type           = remove
sp_after_oc_return_type    = remove
sp_after_oc_at_sel         = remove
sp_after_oc_at_sel_parens  = add
sp_inside_oc_at_sel_parens = remove
sp_before_oc_block_caret   = remove
sp_after_oc_block_caret    = remove
sp_after_oc_msg_receiver   = add
sp_after_oc_property       = add
sp_cond_colon              = add
sp_cond_question           = add
sp_case_label              = ignore
sp_range                   = ignore
sp_after_for_colon         = ignore
sp_before_for_colon        = ignore
sp_extern_paren            = ignore
sp_cmt_cpp_start           = add
sp_endif_cmt               = add
sp_after_new               = add
sp_before_tr_emb_cmt       = add
sp_num_before_tr_emb_cmt   = 0
sp_annotation_paren        = ignore

SP_ARITH

sp_arith.cpp
// sp_arith = remove
// 算術演算子の前後から空白が削除される。
    int ten = one+two+three+four;

// 算術演算子の前後に空白が挿入される。
    int ten = one + two + three + four;

SP_ASSIGN

sp_assign.cpp
// sp_assign = remove
// 代入演算子'='の前後から空白が削除される。
    int ten=10;

// 代入演算子'='の前後に空白が挿入される。
    int ten = 10;

SP_CPP_LAMBDA_ASSIGN

sp_cpp_lambda_assign.cpp
// sp_cpp_lambda_assign = remove
// 外部変数キャプチャ'='の前後から空白が削除される。
    [=](int x) { return x * x; }

// sp_cpp_lambda_assign = add
// 外部変数キャプチャ'='の前後に空白が挿入される。
    [ = ](int x) { return x * x; }

SP_CPP_LAMBDA_PAREN

sp_cpp_lambda_paren.cpp
// sp_cpp_lambda_paren = remove
// キャプチャリストと変数リストの間から空白が削除される。
    [=](int x) { return x * x; }
        ^^

// sp_cpp_lambda_paren = add
// キャプチャリストと変数リストの間に空白が挿入される。
    [=] (int x) { return x * x; }
        ^^^

SP_ASSIGN_DEFAULT

sp_assign_default.cpp
// sp_assign_default = remove
// 関数プロトタイプ宣言のデフォルト値の'='演算子の前後から空白が削除される。
void func(int param1=DEFAULT1, int param2=DEFAULT2);

// sp_assign_default = add
// 関数プロトタイプ宣言のデフォルト値の'='演算子の前後に空白が挿入される。
void func(int param1 = DEFAULT1, int param2 = DEFAULT2);

SP_BEFORE_ASSIGN

sp_before_assign.cpp
// sp_before_assign = remove
// 代入演算子'='の前から空白が削除される。
    x= 10;

// sp_before_assign = add
// 代入演算子'='の前に空白が挿入される。
    x = 10;

SP_AFTER_ASSIGN

sp_after_assign.cpp
// sp_after_assign = remove
// 代入演算子'='の後から空白が削除される。
    x =10;

// sp_after_assign = add
// 代入演算子'='の後に空白が挿入される。
    x = 10;

SP_ENUM_ASSIGN

sp_enum_assign.cpp
// sp_enum_assign = remove
// enumの'='の前後から空白が削除される。
enum {
    a=1,
    c=3,
    e=5,
};

// sp_enum_assign = add
// enumの'='の前後に空白が挿入される。
enum {
    a = 1,
    c = 3,
    e = 5,
};

SP_ENUM_BEFORE_ASSIGN

sp_enum_before_assign.cpp
// sp_enum_before_assign = remove
// enumの'='の前から空白が削除される。
enum {
    a= 1,
    c= 3,
    e= 5,
};

// sp_enum_before_assign = add
// enumの'='の前に空白が挿入される。
enum {
    a = 1,
    c = 3,
    e = 5,
};

SP_ENUM_AFTER_ASSIGN

sp_enum_after_assign.cpp
// sp_enum_after_assign = remove
// enumの'='の後から空白が削除される。
enum {
    a =1,
    c =3,
    e =5,
};

// sp_enum_after_assign = add
// enumの'='の後に空白が挿入される。
enum {
    a = 1,
    c = 3,
    e = 5,
};

SP_PP_CONCAT

sp_pp_concat.cpp
// sp_pp_concat = remove
// プリプロセッサの連結演算子'##'の前後から空白が削除される。
#define PREFIX(var) prefix_##var

// プリプロセッサの連結演算子'##'の前後に空白が挿入される。
#define PREFIX(var) prefix_ ## var

SP_PP_STRINGIFY

sp_pp_stringify.cpp
// sp_pp_stringify = remove
// プロプロセッサの文字列化演算子'#'の前後から空白が削除される。
#define MSG(msg) message(#msg)

// sp_pp_stringify = add
// プロプロセッサの文字列化演算子'#'の前後に空白が挿入される。
#define MSG(msg) message(# msg)

SP_BEFORE_PP_STRINGIFY

sp_before_pp_stringify.cpp
// sp_before_pp_stringify = remove
// プロプロセッサの文字列化演算子'#'の前から空白が削除される。
#define MSG(msg) message(L#msg)

// sp_before_pp_stringify = add
// プロプロセッサの文字列化演算子'#'の前に空白が挿入される。
#define MSG(msg) message(L #msg)

SP_BOOL

sp_bool.cpp
// sp_bool = remove
// ブール演算子'&&'のの前後から空白が削除される。
if (foo&&bar) {
    /* do something */
}

// sp_bool = add
// ブール演算子'&&'のの前後の前後に空白が挿入される。
if (foo && bar) {
    /* do something */
}
14
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
13