Skip to content

Commit

Permalink
Remove Spaces From Annotation Arguments
Browse files Browse the repository at this point in the history
cwarden committed Dec 4, 2024

Verified

This commit was signed with the committer’s verified signature.
cwarden Christian G. Warden
1 parent 202eb8c commit fb456b2
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions formatter/format_test.go
Original file line number Diff line number Diff line change
@@ -429,6 +429,19 @@ func TestCompilationUnit(t *testing.T) {
`public class MyClass { public static void noop() {}}`,
`public class MyClass {
public static void noop() {}
}`},
{
`public class MyClass {
@future (callout=true)
public static void noop() {}
@JsonAccess (serializable = 'samePackage' deserializable = ’sameNamespace’)
public class Serializable{}
}`,
`public class MyClass {
@future(callout=true)
public static void noop() {}
@JsonAccess(serializable='samePackage' deserializable=’sameNamespace’)
public class Serializable {}
}`},
{
`class TestClass {
2 changes: 1 addition & 1 deletion formatter/visitors.go
Original file line number Diff line number Diff line change
@@ -1351,7 +1351,7 @@ func (v *FormatVisitor) VisitDelimitedElementValuePair(ctx *parser.DelimitedElem
}

func (v *FormatVisitor) VisitElementValuePair(ctx *parser.ElementValuePairContext) interface{} {
return fmt.Sprintf("%s = %s", v.visitRule(ctx.Id()), v.visitRule(ctx.ElementValue()))
return fmt.Sprintf("%s=%s", v.visitRule(ctx.Id()), v.visitRule(ctx.ElementValue()))
}

func (v *FormatVisitor) VisitElementValue(ctx *parser.ElementValueContext) interface{} {

0 comments on commit fb456b2

Please sign in to comment.