![代碼排版工具utfy使用說(shuō)明V_第1頁(yè)](http://file4.renrendoc.com/view/30170a2b65aa1bd375efd193f8299e4a/30170a2b65aa1bd375efd193f8299e4a1.gif)
![代碼排版工具utfy使用說(shuō)明V_第2頁(yè)](http://file4.renrendoc.com/view/30170a2b65aa1bd375efd193f8299e4a/30170a2b65aa1bd375efd193f8299e4a2.gif)
![代碼排版工具utfy使用說(shuō)明V_第3頁(yè)](http://file4.renrendoc.com/view/30170a2b65aa1bd375efd193f8299e4a/30170a2b65aa1bd375efd193f8299e4a3.gif)
![代碼排版工具utfy使用說(shuō)明V_第4頁(yè)](http://file4.renrendoc.com/view/30170a2b65aa1bd375efd193f8299e4a/30170a2b65aa1bd375efd193f8299e4a4.gif)
![代碼排版工具utfy使用說(shuō)明V_第5頁(yè)](http://file4.renrendoc.com/view/30170a2b65aa1bd375efd193f8299e4a/30170a2b65aa1bd375efd193f8299e4a5.gif)
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
設(shè)備型號(hào):(開發(fā)管理平臺(tái)專項(xiàng))產(chǎn)品代號(hào):項(xiàng)目代號(hào):代碼排版工具部門:Uncrustfy寬帶產(chǎn)品部擬制: 王旗^.”I^聯(lián);10月27日審核: 年月 日批準(zhǔn): 年月 日.版本記錄 錯(cuò)誤!未指定書簽.引言 背景說(shuō)明 適用范圍 執(zhí)行標(biāo)準(zhǔn) 相關(guān)文檔 參考資料 .代碼排版工具使用說(shuō)明 Uncrustify簡(jiǎn)介 安裝Uncrustify 配置SourceInsight 配置MicrosoftVisualStudio Uncrustify 配置文件說(shuō)明 軟件編程規(guī)范排版要求的支持情況 .附錄UNCRUST雇數(shù)說(shuō)明 .版本記錄序號(hào)文件編號(hào)生成時(shí)間主要修改記錄作者備注12011-10-27初次生成王瑋初始化文檔.引言背景說(shuō)明委托部門:寬帶產(chǎn)品部項(xiàng)目名稱:代碼排版工具選型項(xiàng)目說(shuō)明:本項(xiàng)目為更好的落實(shí)寬帶產(chǎn)品部《軟件編程規(guī)范》中關(guān)于代碼排版的要求,提高代碼的可讀性、排版的規(guī)范性,本著減少編程人員對(duì)代碼排版的工作量、提高工作效率的原則,特以Uncrustify 為基礎(chǔ)開發(fā)了一款代碼排版工具。該工具作為 Sourceinsight以及MicrosoftVisualStudio編輯器的插件,對(duì)C語(yǔ)言編寫的代碼進(jìn)行排版。該工具排版之后的代碼基本可滿足部門《軟件編程規(guī)范CHECKLIST中所有排版類的要求。適用范圍軟件使用對(duì)象:寬帶產(chǎn)品部軟件開發(fā)人員使用范圍:寬帶產(chǎn)品部產(chǎn)品軟件研發(fā)過(guò)程執(zhí)行標(biāo)準(zhǔn)序號(hào)標(biāo)準(zhǔn)名稱版本號(hào)發(fā)布單位備注01M2009015-軟件編程規(guī)范1.2寬帶產(chǎn)品部相關(guān)文檔
序號(hào)文檔名稱版本號(hào)作者備注01M2009015-軟件編程規(guī)范1.2向忠清參考資料序號(hào)文檔名稱版本號(hào)作者發(fā)表日期出版單位/來(lái)源備注01無(wú).代碼排版工具使用說(shuō)明Uncrustify簡(jiǎn)介Uncrustify是一個(gè)代碼美化工具可用于C,C++,C#,ObjectiveC,D,Java,Pawn和VALA源代碼的美化。它能夠利用空格,tab與空格或只有tab進(jìn)行縮排,添加或刪除換行,排列代碼等,并且Uncrustify 具有高配置性,易于修改的特點(diǎn),可配合SourceInsight及MicrosoftVisualStudio進(jìn)行使用。安裝Uncrustify將Uncrustify.rar文件解壓縮即可,解壓縮路徑以"c:\uncrustify”為例。配置SourceInsight打開SourceInsight,選擇菜單“Options-->CustomCommands-->Add,輸入uncrustifyRun中輸入:C:\uncrustify\uncrustify.exe -cC:\uncrustify\uncrustify.cfg -f%f-o%f如果不想對(duì)源代碼文件進(jìn)行備份,可以輸入:C:\uncrustify\uncrustify.exe -cC:\uncrustify\uncrustify.cfg--no-backup -f%f-o%fDir不填寫,將“File,thenLine”打上勾;4然后點(diǎn)對(duì)話框中右側(cè)的按鈕“Keys…”設(shè)置快捷鍵“Ctrl+F85打開要格式化的文件,“Ctrl+F8”即可對(duì)當(dāng)前文件格式化;注1 : C:\uncrustify\uncrustify.exe -cC:\uncrustify\uncrustify.cfg -f%f-o%f命令中,-c表明需要調(diào)用配置文件,%£在SourceInsight中代表當(dāng)前文件,-。表示將排版后的輸出直接替換當(dāng)前文件(需要當(dāng)前文件已經(jīng)保存,否則SourceInsight不會(huì)提示文件被外部編輯器改變,并重新載入 )。注2:%f-o%f也可以使用%$來(lái)替換,表明輸入的是當(dāng)前文件中所選擇的部分,即uncrustify只對(duì)當(dāng)前所選擇的代碼進(jìn)行排版。如果要使用這種方式,請(qǐng)將“PasteOutput”進(jìn)行勾選。酉己置MicrosoftVisualStudio1打開MicrosoftVisualStudio, 選擇菜單“工具-->外部工具-->添加”,在“標(biāo)題”中輸入輸入uncrustify。命令中輸入:C:\uncrustify\uncrustify.exe參數(shù)中軍^入:-cC:\uncrustify\uncrustify.cfg -f$(TargetName)—o$(TargetName)如果不想對(duì)源代碼文件進(jìn)行備份,可以輸入:-cC:\uncrustify\uncrustify.cfg --no-backup-f$(TargetName)—o$(TargetName)4點(diǎn)擊“確定”即可;5打開要格式化的文件,選擇菜單“工具-->外部工具-->uncrustify即可對(duì)當(dāng)前文件格式化;注:$(TargetName)在MicrosoftVisualStudio 中代表當(dāng)前文件。3.5.Uncrustify 配置文件說(shuō)明.縮進(jìn)為4個(gè)空格,未使用Tab;.大括號(hào)不做縮進(jìn);.縮進(jìn)Case;.對(duì)備注進(jìn)行縮進(jìn);.運(yùn)算符兩端加空格;.賦值操作符兩端加空格;.布爾操作符兩端加空格;.比較操作符兩端加空格;.'if','for','switch', 及'while'與后面的‘('之間加空格;.移除’;‘前面的空格;.','后面加空格;.移除’,‘前面的空格;.'if'、'Elseif'、'Eles'、'Try'、'Finally'、'For'、'While'、'Do'、'Switch'語(yǔ)句單獨(dú)占一行;.大括號(hào)單獨(dú)占一行;.遇';'就換行,除了在for語(yǔ)句聲明中;.非注釋行最大字符數(shù)為80;.‘if'、'For'、'While'、'Do'的語(yǔ)句強(qiáng)制增加大括號(hào);.'#if、'#elseif 、'#endif、'#define'強(qiáng)制放在行首;.支持預(yù)編譯指令的縮進(jìn)及換行。6.軟件編程規(guī)范排版要求的支持情況編程規(guī)范的要求是否支持備注全局變量的定義及函數(shù)聲明應(yīng)在頭文件中給出;.C文件中如有main()函數(shù),則應(yīng)將main()放在最前面。不支持需要人工判斷程序塊要采用縮進(jìn)風(fēng)格編寫??s進(jìn)方式應(yīng)與所用開發(fā)工具生動(dòng)自動(dòng)生成的縮進(jìn)相一致。縮進(jìn)量要一致并以Tab鍵為單位,定義Tab為4個(gè)字小。支持未使用Tab鍵,用空格進(jìn)行了替換。相對(duì)獨(dú)立的程序塊之間、變量說(shuō)明之后必須加空行。支持較長(zhǎng)的語(yǔ)句(>80字符)要分成多行書寫,長(zhǎng)表達(dá)式要在低優(yōu)先級(jí)操作符處劃分新行,操作符放在新行之首,劃分出的新行要進(jìn)行適當(dāng)?shù)目s進(jìn),使排版整齊,語(yǔ)句可讀(注:一行程序以支持
小于80字符為宜,不要寫得過(guò)長(zhǎng))。循環(huán)、判斷等語(yǔ)句中若有較長(zhǎng)的表達(dá)式或語(yǔ)句,則要進(jìn)行適應(yīng)當(dāng)?shù)膭澐?,長(zhǎng)表達(dá)式要在低優(yōu)先級(jí)操作符處劃分新行,操作符放在新行之首。不完全支持長(zhǎng)度以上條所定義的為準(zhǔn)表達(dá)式中,若有多個(gè)操作符連寫的情況,應(yīng)使用空格對(duì)它們分隔。支持不允許把多個(gè)短語(yǔ)句寫在一行中,即一行只寫一條語(yǔ)句。支持if、for、do、while、case、switch>default等語(yǔ)句自占一行,且if、for、do、while等語(yǔ)句的執(zhí)行語(yǔ)句部分無(wú)論多少都要加括號(hào){}。支持若只有一條語(yǔ)句時(shí),將強(qiáng)制增加。在兩個(gè)以上的關(guān)鍵字、變量、常量進(jìn)行對(duì)等操作時(shí),它們之間的操作符前后要加空格;進(jìn)行非對(duì)等操作時(shí),如果是關(guān)系密切的立即操作符(如一>),后不應(yīng)加空格。支持除上述支持的排版功能以外,此排版工具還定義了如下排版規(guī)則:.強(qiáng)制移除前面的空格;.'if','for','switch', 及'while'與后面的‘('之間加空格;.對(duì)備注進(jìn)行縮進(jìn);.附錄Uncrustify參數(shù)說(shuō)明##Generaloptions#newlines {Auto,LF,CR,CRLF}Thetypeoflineendingsinput_tab_size NumberTheoriginalsizeoftabsintheinputoutput_tab_size NumberThesizeoftabsintheoutput(onlyusedifalign_with_tabs=true)string_escape_char NumberTheASCIIvalueofthestringescapechar,usually92(\)or94(八).(Pawn)string_escape_char2 NumberAlternatestringescapecharforPawn.Onlyworksrightbeforethequotechar.tok_split_gte{False,True}indent_continue Numberindent_continue Numberindent_continue Numberindent_continue NumberAllowinterpreting'>='and'>>='aspartofatemplatein'voidf(list<list<B>>=val);'.Iftrue(default),'assert(x<0&&y>=3)'willbebroken.Improvementstotemplatedetectionmaymakethisoptionobsolete.utf8_bom {Ignore,Add,Remove,Force}ControlwhattodowiththeUTF-8BOM(recommed'remove')utf8_byte {False,True}Ifthefileonlycontainscharsbetween128and255andisnotUTF-8,thenoutputasUTF-8utf8_force {False,True}ForcetheoutputencodingtoUTF-8##Indenting#indent_columns NumberThenumberofcolumnstoindentperlevel.Usually2,3,4,or8.Thecontinuationindent.Ifnon-zero,thisoverridestheindentof'('and'='continuationindents.ForFreeBSD,thisissetto4.indent_with_tabs NumberHowtousetabswhenindentingcode0=spacesonly1=indentwithtabstobracelevel,alignwithspaces2=indentandalignwithtabs,usingspaceswhennotonatabstopindent_cmt_with_tabs {False,True}Commentsthatarenotabracelevelareindentedwithtabsonatabstop.Requiresindent_with_tabs=2.Iffalse,willusespaces.indent_align_string {False,True}Whethertoindentstringsbrokenby'\'sothattheylineupindent_xml_string NumberThenumberofspacestoindentmulti-lineXMLstrings.Requiresindent_align_string=Trueindent_brace NumberSpacestoindent'{'fromlevel
indent_braces{False,True}indent_braces{False,True}Whetherbracesareindentedtothebodylevelindent_braces_no_func {False,True}Disabledindentingfunctionbracesifindent_bracesistrueindent_braces_no_class {False,True}Disabledindentingclassbracesifindent_bracesistrueindent_braces_no_struct {False,True}Disabledindentingstructbracesifindent_bracesistrueindent_brace_parent {False,True}Indentbasedonthesizeofthebraceparent,i.e.'if'=>3spaces,'for'=>4spaces,etc.indent_namespace {False,True}Whetherthe'namespace'bodyisindentedindent_namespace_level NumberThenumberofspacestoindentanamespaceblockindent_namespace_limit NumberIfthebodyofthenamespaceislongerthanthisnumber,itwon'tbeindented.Requiresindent_namespace=true.Default=0(nolimit)indent_extern {False,True}indent_extern {False,True}indent_extern {False,True}indent_extern {False,True}Whetherthe'extern"C"'bodyisindentedindent_class {False,True}Whetherthe'class'bodyisindentedindent_class_colon {False,True}Whethertoindentthestuffafteraleadingclasscolonindent_ctor_init NumberAdditionalindentingforconstructorinitializerlistindent_else_if {False,True}False=treat'else\nif'as'elseif'forindentingpurposesTrue=indentthe'if'onelevelindent_var_def_blk NumberAmounttoindentvariabledeclarationsafteraopenbrace.neg=relative,pos=absoluteindent_var_def_cont {False,True}Indentcontinuedvariabledeclarationsinsteadofaligning.indent_func_call_param {False,True}True:indentcontinuedfunctioncallparametersoneindentlevelFalse:alignparametersundertheopenparenqualifierqualifierqualifierqualifierindent_func_def_param {False,True}Sameasindent_func_call_param,butforfunctiondefsindent_func_proto_param {False,True}Sameasindent_func_call_param,butforfunctionprotosindent_func_class_param {False,True}Sameasindent_func_call_param,butforclassdeclarationsindent_func_ctor_var_param {False,True}Sameasindent_func_call_param,butforclassvariableconstructorsindent_template_param {False,True}Sameasindent_func_call_param,butfortemplatesindent_func_param_double {False,True}Doubletheindentforindent_func_xxx_paramoptionsindent_func_const NumberIndentationcolumnforstandalone'const'functiondecl/protoqualifierindent_func_throw NumberIndentationcolumnforstandalone'throw'functiondecl/protoindent_member Numberindent_member Numberindent_col1_comment {False,True}indent_col1_comment {False,True}indent_member Numberindent_member Numberindent_col1_comment {False,True}indent_col1_comment {False,True}Thenumberofspacestoindentacontinued'->'or'.'Usuallysetto0,1,orindent_columns.indent_sing_line_comments NumberSpacestoindentsingleline('//')commentsonlinesbeforecodeindent_relative_single_line_comments{False,True}Ifset,willindenttrailingsingleline('//')commentsrelativetothecodeinsteadoftryingtokeepthesameabsolutecolumnindent_switch_case NumberSpacestoindent'case'from'switch'Usually0orindent_columns.indent_case_shift NumberSpacestoshiftthe'case'line,withoutaffectinganyotherlinesUsually0.indent_case_brace NumberSpacestoindent'{'from'case'.Bydefault,thebracewillappearunderthe'c'incase.Usuallysetto0orindent_columns.Whethertoindentcommentsfoundinfirstcolumnindent_label NumberHowtoindentgotolabels>0:absolutecolumnwhere1istheleftmostcolumn<=0:subtractfrombraceindentindent_access_spec NumberSameasindent_label,butforaccessspecifiersthatarefollowedbyacolonindent_access_spec_body {False,True}Indentthecodeafteranaccessspecifierbyonelevel.Ifset,thisoptionforces'indent_access_spec=0'indent_paren_nl {False,True}Ifanopenparenisfollowedbyanewline,indentthenextlinesothatitlinesupaftertheopenparen(notrecommended)indent_paren_close NumberControlstheindentofacloseparenafteranewline.0:IndenttobodylevelAlignundertheopenparenIndenttothebracelevelindent_comma_paren {False,True}indent_comma_paren {False,True}indent_comma_paren {False,True}indent_comma_paren {False,True}Controlstheindentofacommawheninsideaparen.IfTRUE,alignsundertheopenparenindent_bool_paren {False,True}ControlstheindentofaBOOLoperatorwheninsideaparen.IfTRUE,alignsundertheopenparenindent_first_bool_expr {False,True}If'indent_bool_paren'istrue,controlstheindentofthefirstexpression.IfTRUE,alignsthefirstexpressiontothefollowingonesindent_square_nl {False,True}Ifanopensquareisfollowedbyanewline,indentthenextlinesothatitlinesupaftertheopensquare(notrecommended)indent_preserve_sql {False,True}Don'tchangetherelativeindentofESQL/C'EXECSQL'bodiesindent_align_assign {False,True}Aligncontinuedstatementsatthe'='.Default=TrueIfFALSEorthe'='isfollowedbyanewline,thenextlineisindentonetab.#Spacingoptions#sp_arith {Ignore,Add,Remove,Force}Addorremovespacearoundarithmeticoperator'+', '-', '/', '*',etcsp_assign {Ignore,Add,Remove,Force}Addorremovespacearoundassignmentoperator'=','+=',etcsp_assign_default {Ignore,Add,Remove,Force}Addorremovespacearoundassignmentoperator'='inaprototypesp_before_assign {Ignore,Add,Remove,Force}Addorremovespacebeforeassignmentoperator'=','+=',etc.Overridessp_assign.sp_after_assign {Ignore,Add,Remove,Force}Addorremovespaceafterassignmentoperator'=','+=',etc.Overridessp_assign.
sp_enum_assign{Ignore,Add,Remove,sp_enum_assign{Ignore,Add,Remove,Force}Addorremovespacearoundassignment'='inenumsp_enum_before_assign {Ignore,Add,Remove,Force}Addorremovespacebeforeassignment'='inenum.Overridessp_enum_assign.sp_enum_after_assign {Ignore,Add,Remove,Force}Addorremovespaceafterassignment'='inenum.Overridessp_enum_assign.sp_pp_concat {Ignore,Add,Remove,Force}Addorremovespacearoundpreprocessor'##'concatenationoperator.Default=Addsp_pp_stringify {Ignore,Add,Remove,Force}Addorremovespaceafterpreprocessor'#'stringifyoperator.Alsoaffectsthe'#@'charizingoperator.Default=Addsp_bool {Ignore,Add,Remove,sp_bool {Ignore,Add,Remove,sp_bool {Ignore,Add,Remove,sp_bool {Ignore,Add,Remove,Force}Addorremovespacearoundbooleanoperators'&&'and'||'sp_compare {Ignore,Add,Remove,Force}Addorremovespacearoundcompareoperator'<','>','==',etcsp_inside_paren {Ignore,Add,Remove,Force}Addorremovespaceinside'('and')'sp_paren_paren {Ignore,Add,Remove,Force}Addorremovespacebetweennestedparenssp_balance_nested_parens {False,True}Whethertobalancespacesinsidenestedparenssp_paren_brace {Ignore,Add,Remove,Force}Addorremovespacebetween')'and'{'sp_before_ptr_star {Ignore,Add,Remove,Force}Addorremovespacebeforepointerstar'*'{Ignore,Add,Remove,{Ignore,Add,Remove,sp_before_unnamed_ptr_starForce}Addorremovespacebeforepointerstar'*'thatisn'tfollowedbyavariablenameIfsetto'ignore',sp_before_ptr_starisusedinstead.sp_between_ptr_star {Ignore,Add,Remove,Force}Addorremovespacebetweenpointerstars'*'sp_after_ptr_star {Ignore,Add,Remove,Force}Addorremovespaceafterpointerstar'*',iffollowedbyaword.sp_after_ptr_star_func {Ignore,Add,Remove,Force}Addorremovespaceafterapointerstar'*',iffollowedbyafuncproto/def.sp_before_ptr_star_func {Ignore,Add,Remove,Force}Addorremovespacebeforeapointerstar'*',iffollowedbyafuncproto/def.sp_after_type {Ignore,Add,Remove,sp_after_type {Ignore,Add,Remove,sp_after_type {Ignore,Add,Remove,sp_after_type {Ignore,Add,Remove,sp_before_byref {Ignore,Add,Remove,sp_before_byref {Ignore,Add,Remove,Force}Addorremovespacebeforeareferencesign'&'sp_before_unnamed_byref {Ignore,Add,Remove,Force}Addorremovespacebeforeareferencesign'&'thatisn'tfollowedbyavariablenameIfsetto'ignore',sp_before_byrefisusedinstead.sp_after_byref {Ignore,Add,Remove,Force}Addorremovespaceafterreferencesign'&',iffollowedbyaword.sp_after_byref_func {Ignore,Add,Remove,Force}Addorremovespaceafterareferencesign'&',iffollowedbyafuncproto/def.sp_before_byref_func {Ignore,Add,Remove,Force}Addorremovespacebeforeareferencesign'&',iffollowedbyafuncproto/def.Force}Addorremovespacebetweentypeandword.Default=Forcesp_template_angle {Ignore,Add,Remove,Force}Addorremovespacein'template<'vs'templatev'.Ifsettoignore,sp_before_angleisused.sp_before_angle {Ignore,Add,Remove,Force}Addorremovespacebefore'<>'sp_inside_angle {Ignore,Add,Remove,Force}Addorremovespaceinside'<'and'>'sp_after_angle {Ignore,Add,Remove,Force}Addorremovespaceafter'<>'sp_angle_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'<>'and'('asfoundin'newListvbyte>();'Addorremovespaceafter')'of'if','for','switch',and'while'Addorremovespaceafter')'of'if','for','switch',and'while'Addorremovespaceafter')'of'if','for','switch',and'while'Addorremovespaceafter')'of'if','for','switch',and'while'sp_angle_word {Ignore,Add,Remove,sp_angle_word {Ignore,Add,Remove,Force}Force}Force}Addorremovespacebetween'<>'andawordasin'List<byte>m;'sp_angle_shift {Ignore,Add,Remove,Force}Addorremovespacebetween'>'and'>'in'>>'(templatestuffC++/C#only).Default=Addsp_before_sparen {Ignore,Add,Remove,Force}Addorremovespacebefore'('of'if','for','switch',and'while'sp_inside_sparen {Ignore,Add,Remove,Force}Addorremovespaceinsideif-condition'('and')'sp_inside_sparen_close {Ignore,Add,Remove,Force}Addorremovespacebeforeif-condition')'.Overridessp_inside_sparen.sp_after_sparen {Ignore,Add,Remove,sp_sparen_brace {Ignore,Add,Remove,Force}Addorremovespacebetween')'and'{'of'if','for','switch',and'while'sp_invariant_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'invariant'and'('intheDlanguage.sp_after_invariant_paren {Ignore,Add,Remove,Force}Addorremovespaceafterthe')'in'invariant(C)c'intheDlanguage.sp_special_semi {Ignore,Add,Remove,Force}Addorremovespacebeforeemptystatement';'on'if','for'and'while'sp_before_semi {Ignore,Add,Remove,Force}Addorremovespacebefore';'.Default=Removesp_before_semi_for {Ignore,Add,Remove,sp_before_semi_for {Ignore,Add,Remove,sp_before_semi_for {Ignore,Add,Remove,sp_before_semi_for {Ignore,Add,Remove,Force}Addorremovespacebefore';'innon-empty'for'statementssp_before_semi_for_empty {Ignore,Add,Remove,Force}Addorremovespacebeforeasemicolonofanemptypartofaforstatement.sp_after_semi {Ignore,Add,Remove,Force}Addorremovespaceafter';',exceptwhenfollowedbyacomment.Default=Addsp_after_semi_for {Ignore,Add,Remove,Force}Addorremovespaceafter';'innon-empty'for'statements.Default=Forcesp_after_semi_for_empty {Ignore,Add,Remove,Force}Addorremovespaceafterthefinalsemicolonofanemptypartofaforstatement:for(;;<here>).sp_before_square {Ignore,Add,Remove,sp_before_square {Ignore,Add,Remove,sp_before_ellipsis {Ignore,Add,Remove,sp_before_ellipsis {Ignore,Add,Remove,Force}sp_before_square {Ignore,Add,Remove,sp_before_square {Ignore,Add,Remove,sp_before_ellipsis {Ignore,Add,Remove,sp_before_ellipsis {Ignore,Add,Remove,Force}Force}Addorremovespacebefore'['(except'[]')sp_before_squares {Ignore,Add,Remove,Force}Addorremovespacebefore'[]'sp_inside_square {Ignore,Add,Remove,Force}Addorremovespaceinsideanon-empty'['and']'sp_after_comma {Ignore,Add,Remove,Force}Addorremovespaceafter','sp_before_comma {Ignore,Add,Remove,Force}Addorremovespacebefore','sp_paren_comma {Ignore,Add,Remove,Force}Addorremovespacebetweenanopenparenandcomma:'(,'vs'(Force}Force}Force}Force}Addorremovespacebeforethevariadic'…'whenprecededbyanon-punctuatorsp_after_class_colon {Ignore,Add,Remove,Force}Addorremovespaceafterclass':'sp_before_class_c010n {Ignore,Add,Remove,Force}Addorremovespacebeforeclass':'sp_before_case_c010n {Ignore,Add,Remove,Force}Addorremovespacebeforecase':'.Default=Removesp_after_operator {Ignore,Add,Remove,Force}Addorremovespacebetween'operator'andoperatorsignsp_after_operator_sym {Ignore,Add,Remove,Force}Addorremovespacebetweentheoperatorsymbolandtheopenparen,asin'operator++('sp_after_cast {Ignore,Add,Remove,AddorremovespaceafterC/Dcast,i.e.'cast(int)a'vs'cast(int)a'or'(int)a'vs'(int)a'sp_inside_paren_cast {Ignore,Add,Remove,Force}Addorremovespacesinsidecastparenssp_cpp_cast_paren {Ignore,Add,Remove,Force}AddorremovespacebetweenthetypeandopenpareninaC++cast,i.e.'int(exp)'vs'int(exp)'sp_sizeof_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'sizeof'and'('sp_after_tag {Ignore,Add,Remove,Force}Addorremovespaceafterthetagkeyword(Pawn)sp_inside_braces_enum {Ignore,Add,Remove,Force}Addorremovespaceinsideenum'{'and'}'sp_inside_braces_struct {Ignore,Add,Remove,Addorremovespaceinsidestruct/union'{'and'}sp_inside_braces {Ignore,Add,Remove,Force}Addorremovespaceinside'{'and'}'sp_inside_braces_empty {Ignore,Add,Remove,Force}Addorremovespaceinside'{}'sp_type_func {Ignore,Add,Remove,Force}AddorremovespacebetweenreturntypeandfunctionnameAminimumof1isforcedexceptforpointerreturntypes.sp_func_proto_paren {Ignore,Add,Remove,Force}Addorremovespacebetweenfunctionnameand'('onfunctiondeclarationsp_func_def_paren {Ignore,Add,Remove,Force}Addorremovespacebetweenfunctionnameand'('onfunctiondefinitionsp_inside_fparens{Ignore,Add,Remove,sp_inside_fparens{Ignore,Add,Remove,Force}Addorremovespaceinsideemptyfunction'()'sp_inside_fparen {Ignore,Add,Remove,Force}Addorremovespaceinsidefunction'('and')'sp_square_fparen {Ignore,Add,Remove,Force}Addorremovespacebetween']'and'('whenpartofafunctioncall.sp_fparen_brace {Ignore,Add,Remove,Force}Addorremovespacebetween')'and'{'offunctionsp_func_call_paren {Ignore,Add,Remove,Force}Addorremovespacebetweenfunctionnameand'('onfunctioncallssp_func_call_paren_empty {Ignore,Add,Remove,Force}Addorremovespacebetweenfunctionnameand'()'onfunctioncallswithoutparameters.Ifsetto'ignore'(thedefault),sp_func_call_parenisused.sp_func_call_user_paren {Ignore,Add,Remove,Force}Addorremovespacebetweentheuserfunctionnameand'('onfunctioncallsYouneedtosetakeywordtobeauserfunction,likethis:'setfunc_call_user_'intheconfigfile.sp_func_class_paren {Ignore,Add,Remove,Force}Addorremovespacebetweenaconstructor/destructorandtheopenparensp_return_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'return'and'('sp_attribute_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'__attribute__'and'('sp_defined_paren {Ignore,Add,Remove,Force}
Addorremovespacebetween'defined'and'('in'#ifdefined(FOO)'sp_throw_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'throw'and'('in'throwsp_catch_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'catch'and'('in'catch{}'Ifsettoignore,sp_before_sparenisused.sp_version_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'version'and'('(something){}'(Dlanguage)Ifsettoignore,sp_before_sparenisused.sp_scope_paren {Ignore,Add,Remove,Force}Addorremovespacebetween'scope'and'('in'scope{}'(Dlanguage)(something)(something)in'version(something)Ifsettoignore,sp_before_sparenisused.
(something)(something)in'version(something)sp_macro{Ignore,Add,Remove,sp_macro{Ignore,Add,Remove,Force}Addorremovespacebetweenmacroandvaluesp_macro_func {Ignore,Add,Remove,Force}Addorremovespacebetweenmacrofunction')'andvaluesp_else_brace {Ignore,Add,Remove,Force}Addorremovespacebetween'else'and'{'ifonthesamelinesp_brace_else {Ignore,Add,Remove,Force}Addorremovespacebetween'}'and'else'ifonthesamelinesp_brace_typedef {Ignore,Add,Remove,Force}Addorremovespacebetween'}'andthenameofatypedefonthesamelinesp_catch_brace {Ignore,Add,Remove,Force}Addorremovespacebetween'catch'and'{'ifonthesamelinesp_brace_catch {Ignore,Add,Remove,sp_brace_catch {Ignore,Add,Remove,Force}Force}sp_brace_catch {Ignore,Add,Remove,sp_brace_catch {Ignore,Add,Remove,Force}Force}Force}Addorremovespacebetween'}'and'catch'ifonthesamelinesp_finally_brace {Ignore,Add,Remove,Force}Addorremovespacebetween'finally'and'{'ifonthesamelinesp_brace_finally {Ignore,Add,Remove,Force}Addorremovespacebetween'}'and'finally'ifonthesamelinesp_try_brace {Ignore,Add,Remove,Force}Addorremovespacebetween'try'and'{'ifonthesamelinesp_getset_brace {Ignore,Add,Remove,Force}Addorremovespacebetweenget/setand'{'ifonthesamelinesp_before_dc {Ignore,Add,Remove,Force}Addorremovespacebeforethe'::'operatorsp_after_dc {Ignore,Add,Remove,Addorremovespaceafterthe'::'operatorsp_d_array_c010n {Ignore,Add,Remove,Force}AddorremovearoundtheDnamedarrayinitializer':'operatorsp_not {Ignore,Add,Remove,Force}Addorremovespaceafterthe'!'(not)operator.Default=Removesp_inv {Ignore,Add,Remove,Force}Addorremovespaceafterthe'~'(invert)operator.Default=Removesp_addr {Ignore,Add,Remove,Force}Addorremovespaceafterthe'&'(address-of)operator.Default=RemoveThisdoesnotaffectthespacingaftera'&'thatispartofatype.sp_member {Ignore,Add,Remove,Force}Addorremovespacearoundthe'.'or'->'operators.Default=Removesp_deref {Ignore,Add,Remove,Force}Addorremovespaceafterthe'*'(dereference)operator.Default=RemoveThisdoesnotaffectthespacingaftera'*'thatispartofatype.sp_sign {Ignore,Add,Remove,Force}Addorremovespaceafter'+'or'-',asin'x=-5'or'y=+7'.Default=Removesp_incdec {Ignore,Add,Remove,Force}Addorremovespacebeforeorafter'++'and'--',asin'(--x)'or'y++;'.Default=Removesp_before_nl_cont {Ignore,Add,Remove,Force}Addorremovespacebeforeabackslash-newlineattheendofaline.Default=Addsp_after_oc_scope {Ignore,Add,Remove,sp_after_oc_scope {Ignore,Add,Remove,sp_after_oc_scope {Ignore,Add,Remove,sp_after_oc_scope {Ignore,Add,Remove,Force}Addorremovespaceafterthescope'+'or'-',asin'-(void)foo;'or'+(int)bar;'sp_after_oc_c010n {Ignore,Add,Remove,Force}Addorremovespaceafterthecoloninmessagespecs'-(int)f:(int)x;'vs'-(int)f:(int)x;'sp_before_oc_c010n {Ignore,Add,Remove,Force}Addorremovespacebeforethecoloninmessagespecs'-(int)f:(int)x;'vs'-(int)f:(int)x;'sp_after_send_oc_c010n {Ignore,Add,Remove,Force}Addorremovespaceafterthecoloninmessagespecs'[objectsetValue:1];'vs'[objectsetValue:1];'sp_before_send_oc_c010n {Ignore,Add,Remove,Force}Addorremovespacebeforethecoloninmessagespecs[objectsetValue:1];'vs'[objectsetValue:1];'Force}Force}Force}Force}sp_after_oc_type{Ignore,Add,Remove,sp_after_oc_type{Ignore,Add,Remove,Force}Addorremovespaceafterthe(type)inmessagespecs'-(int)f:(int)x;'vs'-(int)f:(int)x;'sp_after_oc_return_type {Ignore,Add,Remove,Force}Addorremovespaceafterthefirst(type)inmessagespecs'-(int)f:(int)x;'vs'-(int)f:(int)x;'sp_after_oc_at_sel {Ignore,Add,Remove,Force}Addorremovespacebetween'@selector'and'(''@selector(msgName)'vs'@selector(msgName)'Alsoappliesto@protocol()constructssp_after_oc_at_sel_parens {Ignore,Add,Remove,Force}Addorremovespacebetween'@selector(x)'andthefollowingword'@selector(foo)a:'vs'@selector(foo)a:'sp_inside_oc_at_sel_parens{Ignore,Add,Remove,Addorremovespaceinside'@selector'parens'@selector(foo)'vs'@selector(foo)'Alsoappliesto@protocol()constructssp_before_oc_block_caret {Ignore,Add,Remove,Force}Addorremovespacebeforeablockpointercaret'Aint(intarg){…}'vs.'Aint(intarg){…}'sp_after_oc_block_caret {Ignore,Add,Remove,Force}Addorremovespaceafterablockpointercaret'Aint(intarg){…}'vs.'八int(intarg){…}'sp_cond_colon {Ignore,Add,Remove,Force}Addorremovespacearoundthe':'in'b?t:f'sp_cond_question {Ignore,Add,Remove,Force}Addorremovespacearoundthe'?'in'b?t:f'sp_case_label {Ignore,Add,Remove,Fixthespacingbetween'case'andthelabel.Only'ignore'and'force'makesensehere.sp_range {Ignore,Add,Remove,Force}ControlthespacearoundtheD'..'operator.sp_cmt_cpp_start {Ignore,Add,Remove,Force}ControlthespaceaftertheopeningofaC++comment'//A'vs'//A'sp_endif_cmt {Ignore,Add,Remove,commentForce}commentControlsthespacesbetween#elseor#endifandatrailingsp_after_new {Ignore,Add,Remove,Force}Controlsthespacesafter'new','delete',and'delete[]'sp_before_tr_emb_cmt {Ignore,Add,Remove,Force}Controlsthespacesbeforeatrailingorembeddedcommentsp_num_before_tr_emb_cmt NumberNumberofspacesbeforeatrailingorembeddedcomment#Codealignment(notleftcolumnspaces/tabs)#align_keep_tabs {False,True}Whethertokeepnon-indentingtabsalign_with_tabs {False,True}Whethertousetabsforaligningalign_on_tabstop {False,True}Whethertobumpouttothen
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 知識(shí)產(chǎn)全轉(zhuǎn)讓過(guò)程中的法律服務(wù)研究
- 2025年翡翠金融項(xiàng)目提案報(bào)告
- 2025年汽車油罐項(xiàng)目可行性研究報(bào)告
- 2021-2026年中國(guó)瑜伽館市場(chǎng)競(jìng)爭(zhēng)策略及行業(yè)投資潛力預(yù)測(cè)報(bào)告
- 生產(chǎn)線優(yōu)化現(xiàn)代生產(chǎn)管理的關(guān)鍵
- 轉(zhuǎn)租申請(qǐng)書范本
- 2025年絨襪行業(yè)深度研究分析報(bào)告
- 福州科技職業(yè)技術(shù)學(xué)院《特殊兒童醫(yī)學(xué)基礎(chǔ)》2023-2024學(xué)年第二學(xué)期期末試卷
- 大連醫(yī)科大學(xué)中山學(xué)院《大數(shù)據(jù)技術(shù)原理與應(yīng)用》2023-2024學(xué)年第二學(xué)期期末試卷
- 貴州水利水電職業(yè)技術(shù)學(xué)院《感覺(jué)統(tǒng)合訓(xùn)練》2023-2024學(xué)年第二學(xué)期期末試卷
- 地理標(biāo)志培訓(xùn)課件
- 2023行政主管年終工作報(bào)告五篇
- 印刷公司生產(chǎn)部2025年年度工作總結(jié)及2025年工作計(jì)劃
- GA/T 1003-2024銀行自助服務(wù)亭技術(shù)規(guī)范
- 公園衛(wèi)生保潔考核表
- 2024年居間完整協(xié)議書居間完整協(xié)議書
- 《化妝知識(shí)講座》課件
- 川教版四年級(jí)《生命.生態(tài).安全》下冊(cè)全冊(cè) 課件
- 體育-水平二-三年級(jí)籃球大單元教學(xué)計(jì)劃表及原地運(yùn)球教學(xué)設(shè)計(jì)、教案
- 伙食原料第二保質(zhì)期標(biāo)準(zhǔn)執(zhí)行表
- 備戰(zhàn)2025年高考數(shù)學(xué)壓軸題訓(xùn)練專題13三角函數(shù)(全題型壓軸題)(學(xué)生版+解析)
評(píng)論
0/150
提交評(píng)論