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

Parsing fails for files with comments before import statements #37

Open
JetA2 opened this issue May 12, 2021 · 1 comment
Open

Parsing fails for files with comments before import statements #37

JetA2 opened this issue May 12, 2021 · 1 comment

Comments

@JetA2
Copy link

JetA2 commented May 12, 2021

Hi, thanks for the nice extension!

There is an issue with files that have comments before the import statements, for example source file headers such as:

/*
 * File: xyz.dart
 * Project: ABC
 * Created: 2021-05-06 14:15:51
 */

import 'file.dart';

Parsing stops if the first non-empty line is not an import statement which means no import fixing will be done on files like these.

https://github.com/luanpotter/vscode-dart-import/blob/28c375f14c8f0d87e96c6af567dacee91523143c/src/main.ts#L47-L49

Changing line 48 to continue; should fix it.

@WorikQCI
Copy link

Me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants