xixiaofinland / afmt

Salesforce Apex code formatter written in Rust
MIT License
23 stars 3 forks source link

Minor Spacing Item #15

Closed aheber closed 1 month ago

aheber commented 1 month ago

You can discard this if this is intentional. Given that you've added spaces in many places it feels like you'd prefer to format this differently.

The parenthesis of trigger events is placed directly against the target object. I would have expected it to have a space.

Example:

trigger TestTrigger on Account (after insert) {}

Formatted:

trigger TestTrigger on Account(after insert) {
}
xixiaofinland commented 1 month ago

Did I prefer adding the space? I assume I don't use an empty space between "name" and the "(....)" in all cases, such as method(Integer a) in:

class A {
  public void method(Integer a) {
  }
}

in PA playground, it's the same result.

trigger TestTrigger on Account(after insert) {
}
aheber commented 1 month ago

Thanks for checking on that. I think in my mind this was closer to an if statement than a method call.