From 974a9856d73bb8291c8ed65269e869a7e12bf73c Mon Sep 17 00:00:00 2001 From: Mihai Popescu Date: Tue, 19 Jun 2018 11:17:38 +0200 Subject: [PATCH 1/3] enable config for 40685 --- tests/config/staging/UNI-40685.cfg | 5 ----- tests/config/staging/Uncrustify.CSharp.cfg | 10 ++++++++++ tests/regression.test | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) delete mode 100644 tests/config/staging/UNI-40685.cfg diff --git a/tests/config/staging/UNI-40685.cfg b/tests/config/staging/UNI-40685.cfg deleted file mode 100644 index 9ca1e813cb..0000000000 --- a/tests/config/staging/UNI-40685.cfg +++ /dev/null @@ -1,5 +0,0 @@ -include Uncrustify.CSharp.cfg -indent_cs_delegate_body=true -indent_paren_open_brace=true -indent_member_single=true -indent_paren_close=2 \ No newline at end of file diff --git a/tests/config/staging/Uncrustify.CSharp.cfg b/tests/config/staging/Uncrustify.CSharp.cfg index e773446f67..60627496eb 100644 --- a/tests/config/staging/Uncrustify.CSharp.cfg +++ b/tests/config/staging/Uncrustify.CSharp.cfg @@ -9,3 +9,13 @@ indent_using_block=false # { False, True } indent_col1_multi_string_literal=true # { False, True } # Whether to indent multi string literal in first column. # + +indent_cs_delegate_body=true # { False, True } +# indent a C# delegate(To hanndle delegates with no brace) by another level. default: false +# + +indent_paren_close=2 # Unsigned Number +# Controls the indent of a close paren after a newline. +# 0: Indent to body level +# 1: Align under the open paren +# 2: Indent to the brace level diff --git a/tests/regression.test b/tests/regression.test index 45419012c4..1b2b6c0353 100644 --- a/tests/regression.test +++ b/tests/regression.test @@ -137,7 +137,7 @@ 60047 staging/UNI-24076.cfg staging/UNI-24076.cs 60050 staging/UNI-40605.cfg staging/UNI-40605.cs 60051 staging/Uncrustify.Cpp.cfg staging/UNI-11643.cpp -60052 staging/UNI-40685.cfg staging/UNI-40685.cs +60052 staging/Uncrustify.CSharp.cfg staging/UNI-40685.cs 60053 staging/Uncrustify.CSharp.cfg staging/UNI-36862.cs 60054 staging/UNI-25811.cfg staging/UNI-25811.cpp 60055 staging/Uncrustify.Common-Cpp.cfg staging/UNI-29935.cpp From 860b870edea2cd41db4e76b394814b979afe8c0a Mon Sep 17 00:00:00 2001 From: Mihai Popescu Date: Tue, 19 Jun 2018 11:17:50 +0200 Subject: [PATCH 2/3] accept output for other tests --- .../output/staging/60045-indent-multistring-coulmn1.cs | 2 +- tests/output/staging/60050-UNI-40605.cs | 2 +- tests/output/staging/60064-UNI-47842.cs | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/output/staging/60045-indent-multistring-coulmn1.cs b/tests/output/staging/60045-indent-multistring-coulmn1.cs index dc951c06c1..57464fdc6e 100644 --- a/tests/output/staging/60045-indent-multistring-coulmn1.cs +++ b/tests/output/staging/60045-indent-multistring-coulmn1.cs @@ -1,7 +1,7 @@ //This var a = hello( @"world" - ); +); //should stay the same. //But this diff --git a/tests/output/staging/60050-UNI-40605.cs b/tests/output/staging/60050-UNI-40605.cs index 1aa9339478..869a9d0f73 100644 --- a/tests/output/staging/60050-UNI-40605.cs +++ b/tests/output/staging/60050-UNI-40605.cs @@ -36,7 +36,7 @@ public static T WithAdditionalFlags(this T _this, IEnumerable flags) var projectEntries = islands.Select(i => string.Format( DefaultSynchronizationSettings.SolutionProjectEntryTemplate, SolutionGuid(i), _projectName, Path.GetFileName(ProjectFile(i)), ProjectGuid(i._output) - )); +)); Func, IEnumerable> filterMembersWithObsoleteAttr = members => members.Where(m => diff --git a/tests/output/staging/60064-UNI-47842.cs b/tests/output/staging/60064-UNI-47842.cs index fa80d92b4c..b6ec890131 100644 --- a/tests/output/staging/60064-UNI-47842.cs +++ b/tests/output/staging/60064-UNI-47842.cs @@ -19,7 +19,7 @@ void dummy() abc(transform.rotation * Quaternion.LookRotation(Vector3.forward), size, EventType.Repaint - ); + ); } } } @@ -28,12 +28,12 @@ void dummy() //Case 4 static void DefaultRadiusHandleDrawFunction( int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType - ) +) { return Scripting::ScriptingWrapperFor(useCurveRanges ? cache.GetPreview(previewSize, actualObject, color, topFillColor, bottomFillColor, curveRanges) : cache.GetPreview(previewSize, actualObject, color, topFillColor, bottomFillColor) - ); + ); } //Case-5 @@ -49,7 +49,7 @@ int func_name() REGISTER_TYPE_ATTRIBUTES(AvatarMask, (LegacyPersistentTypeID, (1011, // AvatarMask (old) 1012)) // AvatarSkeletonMask - ); +); //Case 7 char* br = (char*)mem2chunk((size_t)(((size_t)((char*)mem + alignment - @@ -123,7 +123,7 @@ private void DoCurveDropdown(Rect rect, AnimationWindowHierarchyNode node, int r GetTemplateIndex(templateProp.stringValue), TemplateGUIThumbnails, numCols - )].ToString(); + )].ToString(); //Case 15 From 6f48f3ccb38288097c6c8c54ae48cf8cdbd4656a Mon Sep 17 00:00:00 2001 From: Mihai Popescu Date: Tue, 19 Jun 2018 11:46:35 +0200 Subject: [PATCH 3/3] add 40605 to the mix --- tests/config/staging/UNI-40605.cfg | 2 -- tests/regression.test | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 tests/config/staging/UNI-40605.cfg diff --git a/tests/config/staging/UNI-40605.cfg b/tests/config/staging/UNI-40605.cfg deleted file mode 100644 index 32b3fa515e..0000000000 --- a/tests/config/staging/UNI-40605.cfg +++ /dev/null @@ -1,2 +0,0 @@ -include Uncrustify.CSharp.cfg -indent_cs_delegate_body=true \ No newline at end of file diff --git a/tests/regression.test b/tests/regression.test index 1b2b6c0353..4bf07e32cc 100644 --- a/tests/regression.test +++ b/tests/regression.test @@ -135,7 +135,7 @@ 60045 staging/Uncrustify.CSharp.cfg staging/indent-multistring-coulmn1.cs 60046 staging/UNI-24090.cfg staging/UNI-24090.cs 60047 staging/UNI-24076.cfg staging/UNI-24076.cs -60050 staging/UNI-40605.cfg staging/UNI-40605.cs +60050 staging/Uncrustify.CSharp.cfg staging/UNI-40605.cs 60051 staging/Uncrustify.Cpp.cfg staging/UNI-11643.cpp 60052 staging/Uncrustify.CSharp.cfg staging/UNI-40685.cs 60053 staging/Uncrustify.CSharp.cfg staging/UNI-36862.cs