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

wake-format: Trailing whitespace in import statements not removed #1669

Open
richardxia opened this issue Dec 4, 2024 · 2 comments
Open
Labels
bug Something isn't working wake-format

Comments

@richardxia
Copy link
Member

This is on wake 44.0.4.

$ cat >foo.wake <<-'EOF'
package foo

from wake import println 

def _ =
    println "Hello"
EOF

# Double check that there is indeed a trailing space on the import line
$ grep '\s$' foo.wake
from wake import println 

$ wake-format -i foo.wake

# Confirm that there is still a trailing space on the import line
$ grep '\s$' foo.wake
from wake import println 
@richardxia richardxia added bug Something isn't working wake-format labels Dec 4, 2024
@ag-eitilt
Copy link
Collaborator

This is definitely a good thing to catch, thanks! To be clear, you've not seen it add spaces, just fail to remove them, right? That's actually weirder to me than if it was always generating the bad code since a lot of the formatter's architecture is built around throwing out the specifics of the input and always generating a consistent output.

@richardxia
Copy link
Member Author

Yes, just fail to remove them, at least as far as I have seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wake-format
Projects
None yet
Development

No branches or pull requests

2 participants