-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Hi,
SortUsings behaves differently in editor quick fix and save file action.
Sorting in the editor using quick fix:
settings.json
This
namespace X;
using SofteraBaltic.C;
using Microsoft.B;
using System.A;is sorted like this using a "light bulb"
namespace X;
using System.A;
using Microsoft.B;
using SofteraBaltic.C;which is correct order.
Sorting using file save action:
settings.json
{
"editor.codeActionsOnSave": {
"source.fixAll.al": "explicit",
},
"alOutline.namespacesSortOrder": [
"System",
"Microsoft",
"SofteraBaltic",
],
"alOutline.codeActionsOnSave": [
"SortUsings",
],
}This
namespace X;
using SofteraBaltic.C;
using Microsoft.B;
using System.A;is sorted like this when saving the file:
namespace X;
using Microsoft.B;
using SofteraBaltic.C;
using System.A;which is just alphabetical order.
Using SortUsings as part as code cleanup works as expected.
"alOutline.codeCleanupActions": [
"SortUsings",
],It seems that SortUsings in alOutline.codeActionsOnSave does not consider the workspace settings - removing all workspace settings and using Sort usings quck fix gives the second result.
Here is a simple project without any dependencies for reproducing the problem:
Repro.zip
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
{ // "editor.codeActionsOnSave": { // "source.fixAll.al": "explicit", // }, "alOutline.namespacesSortOrder": [ "System", "Microsoft", "SofteraBaltic", ], // "alOutline.codeActionsOnSave": [ // "SortUsings", // ], }