Skip to content

Commit

Permalink
Remove Spaces From Annotation Arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
cwarden committed Dec 4, 2024
1 parent 202eb8c commit fb456b2
Show file tree
Hide file tree
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
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion formatter/visitors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{} {
Expand Down

0 comments on commit fb456b2

Please sign in to comment.