Skip to content

Space removed before C# attributes on property getters #1276

@mihaipopescu

Description

@mihaipopescu

extern internal bool canAccess { [NativeMethod(Name = "CanAccessFromScript")] get; }
gets formatted to
extern internal bool canAccess {[NativeMethod(Name = "CanAccessFromScript")] get; }
[space missing]

extern public int subMeshCount { get; [NativeMethod<...>
is kept intact though

Expected versus output diff:

diff --git "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\60024-UNI-19644.cs" "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\60024-UNI-19644.cs"
index da76bfb..c717992 100644
--- "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\60024-UNI-19644.cs"
+++ "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\60024-UNI-19644.cs"
@@ -1,7 +1,7 @@
 //It deletes the space after {
-class Foo 
+class Foo
 {
-    extern internal bool canAccess { [NativeMethod(Name = "CanAccessFromScript")] get; }
+    extern internal bool canAccess {[NativeMethod(Name = "CanAccessFromScript")] get; }
 
-    extern public int subMeshCount { get; [NativeMethod(Name = "CanAccessFromScript")] set; } 
+    extern public int subMeshCount { get; [NativeMethod(Name = "CanAccessFromScript")] set; }
 }

Debug support files:

60024-UNI-19644.cs
60024-UNI-19644.cs.log
60024-UNI-19644.cs.unc
Uncrustify.CSharp.cfg
UNI-19644.cs

Disclaimer:

Note: This is a generated issue from our internal issue tracker.
Expect a dry description which could be insufficient to properly understand the issue.
On the other hand, the support files should be sufficient to easily reproduce and debug the issue,
but please comment if it's still unclear and I will get back with clarifications.
See main discussion thread here #1223.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions