Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-line conditional statements #16

Closed
arvindkgs opened this issue Feb 21, 2019 · 2 comments
Closed

Support multi-line conditional statements #16

arvindkgs opened this issue Feb 21, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@arvindkgs
Copy link

Prettier supports multi-line statements - Multi-line-objects. However, the prettier-apex does not support the following -
if (!SObjectType.Attribute__c.fields.Name.isAccessible() || !SObjectType.Attribute__c.fields.Display_on_Actions_Tab__c.isAccessible() || !SObjectType.Attribute__c.fields.Display_Order__c.isAccessible() || !SObjectType.Attribute__c.fields.Icon__c.isAccessible() || !SObjectType.Action__c.fields.Name.isAccessible() || !SObjectType.Action__c.fields.Description__c.isAccessible() || !SObjectType.Action__c.fields.Translation_Index__c.isAccessible() || !SObjectType.Action__c.fields.State__c.isAccessible() || !SObjectType.Action__c.fields.Display_Tab__c.isAccessible() || !SObjectType.Action__c.fields.Display_Tile__c.isAccessible() || !SObjectType.Action__c.fields.Action_Type_Attribute__c.isAccessible() || !SObjectType.Action__c.fields.Tile_Type_Attribute__c.isAccessible() || !SObjectType.Action__c.fields.From_Date__c.isAccessible() || !SObjectType.Action__c.fields.To_Date__c.isAccessible() || !SObjectType.Action__c.fields.Parent__c.isAccessible() || !SObjectType.Action__c.fields.RecordTypeId.isAccessible())

It makes the above condition into a single line.

@dangmai
Copy link
Owner

dangmai commented Feb 21, 2019

Thank you for the bug report! This is indeed an issue that should get fixed.

@dangmai dangmai self-assigned this Feb 21, 2019
@dangmai dangmai added the bug Something isn't working label Feb 21, 2019
@dangmai dangmai closed this as completed in 1bca96e Mar 6, 2019
@dangmai
Copy link
Owner

dangmai commented Mar 6, 2019

FYI I published version 1.0.0-alpha.6 that should fix this issue. Please update your local version and let me know if that's what you expected.

Thanks for the bug report again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants