JJLongoria / aura-helper

Repository for manage the development of Aura Helper VSCode Extension
GNU General Public License v3.0
9 stars 5 forks source link

ORDER BY clause is wrongly formatted in dynamic SOQL #39

Closed fanch-ragon closed 2 years ago

fanch-ragon commented 2 years ago

Hi, it seems the white space between a bind variable and the "ORDER" key word is removed on formatting if "aurahelper.apexFormat.query.oneClausePerLine" is set to false. The bellow exemple replicates the issue on my VSC: public class SomeClass{ public void someMethod(){ String someString = 'some'; SomeSObject__c[] lSObject = [SELECT Id FROM SomeSObject__c WHERE SomeField__c = :someString ORDER BY SomeOtherField__c DESC]; } }

It becomes: public class SomeClass{ public void someMethod(){ String someString = 'some'; SomeSObject__c[] lSObject = [SELECT Id FROM SomeSObject__c WHERE SomeField__c = :someStringORDER BY SomeOtherField__c DESC]; } }

I don't have the issue if "aurahelper.apexFormat.query.oneClausePerLine" is set to true Hope this feedback can be helpful!

JJLongoria commented 2 years ago

Hi @fanch-ragon thanks for comment and sharing this issue and sorry for the problems, I start to working on it and publish a fix ASAP.

Thanks for use Aura Helper and I hope you like it.

Regards Juan Jose Longoria

JJLongoria commented 2 years ago

Hello @fanch-ragon , I publish now the new 3.1.7 version when your reported error fixed. Sorry for the problems and thanks to report.

Enjoy Aura Helper

Regards. Juan José Longoria

fanch-ragon commented 2 years ago

It's working fine, thanks for the update :) Although I just discovered it, I definetly love this extension. Very helpful.