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

Auto-Import After Ammonite Headers #4436

Merged

Conversation

LaurenceWarne
Copy link
Contributor

Hi! This PR changes auto imports with Ammonite scripts so that if a script does not already contain an import, the first import is added after any Ammonite headers, since these comments need to appear at the top of the file.

The implementation is otherwise similar to how // using comments are skipped in scala cli scripts. Thanks!

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgodzik tgodzik merged commit ae3ad4f into scalameta:main Sep 26, 2022
@LaurenceWarne
Copy link
Contributor Author

Thanks!

@LaurenceWarne LaurenceWarne deleted the add-first-import-after-ammonite-header branch September 26, 2022 11:26
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

Successfully merging this pull request may close these issues.

2 participants