Skip to content

"Fix all imports" > "No dart files were found" #33

Description

@DarkMikey

dart-import.fix-all will result in info message "No dart files were found".

I have a nested project structure, that contains several packages. I assume this is the reason why the extension can't find any dart files?

const filesUris = await vscode.workspace.findFiles('lib/**/**.dart', excludeFiles);

if (filesUris.length === 0) {
    showInfoMessage('No dart files were found');
    return;
}

Is there anything I can do beside enabling dartImport.fixOnSave?

flutter doctor
[√] Flutter (Channel stable, 1.22.5, on Microsoft Windows [Version 10.0.19041.685], locale de-AT)
    • Flutter version 1.22.5 at C:\Flutter
    • Framework revision 7891006299 (5 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[√] VS Code, 64-bit edition (version 1.52.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.18.1

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions