RasmusTidselbak / al-var-helper

6 stars 6 forks source link

Sorting of array variables #14

Closed jwikman closed 5 years ago

jwikman commented 5 years ago

It seems as if array is considered it's own datatype when sorting of variables is checked

So

ColumnRecords: array[32] of Record Date;

is not considered a Record, but an array - and should be sorted after the object types.

jwikman commented 5 years ago

@RasmusTidselbak Forget this one. I was running AL Language extension v2.1.106653 (from CU5) with this behavior.

Now I'm running v3.0.115791 (BC 14), and now your extension does it the way AL Extension expects it to.

They even put in a new warning text for rule AA0021: "Variable declarations should be ordered by type. Variables should be sorted like this: Record, Report, Codeunit, XmlPort, Page, Query, Notification, BigText, DateFormula, RecordId, RecordRef, FieldRef, and FilterPageBuilder. The rest of the variables are not sorted."