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

fmt: fix removal of used selective and alias imports in modules in $VMODULES dirs #20977

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Mar 8, 2024

Fixes issues the formatter introduces(/false negative formatting checks) in modules that are located in a $VMODULES directory.

E.g. the following, when located in ~/.vmodules,...

// ~/.vmodules/foo/main.v
import x.json2 as json
import datatypes { Stack }

const my_datatype = Stack[string]{}

will currently be formatted into:

// ~/.vmodules/foo/main.v
import x.json2
import datatypes

const my_datatype = Stack[string]{}

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Excellent work.

@spytheman spytheman merged commit 8ddceab into vlang:master Mar 8, 2024
42 checks passed
@ttytm ttytm deleted the vfmt/fix-fmt-imports-in-vmodules branch March 8, 2024 09:37
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.

None yet

2 participants