Incorrect code formatting

Issue #1901 resolved
Piotr Kożuchowski created an issue

SObject files are incorrectly indented in following example:

        new TestDataBuilder()
            .create(new Account(
            FirstName = 'TestName',
            LastName = 'LastName',
            PersonEmail = 'test1@example.com',
            Phone = '32543555',
            BillingPostalCode = '12348',
            BillingCity = 'TestCity',
            BillingState = 'TestState',
            External_Customer_ID__c = '29ff9955a03543c48f69782eac676c66'))

            .create(new Account(
            FirstName = 'TestName1',
            LastName = 'LastName1',
            PersonEmail = 'test2@example.com',
            Phone = '32543555',
            BillingPostalCode = '12348',
            BillingCity = 'TestCity',
            BillingState = 'TestState',
            External_Customer_ID__c = '29ff9955a03543c48f69782eac676c67'
        ))
            .insertRecords();

This happens when new SObject(fields=XXX) is passed to method that accepts sObject.

Expected formatting:

        new TestDataBuilder()
            .create(new Account(
                FirstName = 'TestName',
                LastName = 'LastName',
                PersonEmail = 'test1@example.com',
                Phone = '32543555',
                BillingPostalCode = '12348',
                BillingCity = 'TestCity',
                BillingState = 'TestState',
                External_Customer_ID__c = '29ff9955a03543c48f69782eac676c66'
            ))
            .create(new Account(
                FirstName = 'TestName1',
                LastName = 'LastName1',
                PersonEmail = 'test2@example.com',
                Phone = '32543555',
                BillingPostalCode = '12348',
                BillingCity = 'TestCity',
                BillingState = 'TestState',
                External_Customer_ID__c = '29ff9955a03543c48f69782eac676c67'
            ))
            .insertRecords();

Comments (6)

  1. Scott Wells repo owner

    Hmmmm...I was hoping to squeeze this into tomorrow morning's build, but after debugging for a few minutes it's not quite as straightforward as I'd expected/hoped. I don't think there will be any issue addressing for next week's build, though.

  2. Scott Wells repo owner

    I finally fixed this. The fix will be included (along with a number of other formatter fixes/enhancements) in tomorrow's build.

  3. Log in to comment