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

empty named entry in parameter list is deleted #125

Closed
Hugovdberg opened this issue Dec 6, 2021 · 1 comment · Fixed by #183
Closed

empty named entry in parameter list is deleted #125

Hugovdberg opened this issue Dec 6, 2021 · 1 comment · Fixed by #183
Labels
bug Something isn't working

Comments

@Hugovdberg
Copy link

When a parameter_list contains a empty named entry it is deleted by snakefmt upon formatting if there are other entries. Somewhat related to #104.

rule foo:
    input:
        bar="fileA.data",
        baz=

is formatted to

rule foo:
    input:
        bar="fileA.data",

But if the bar entry wasn't there the same error is raised as in #104.

This is not a really big issue, although it produces some unexpected results if you have Visual Studio Code setup to autoformat on save and a save is triggered (in my case because of an autosave on context change). I understand empty lines are deleted, but I think this should be a grammar error instead of simply deleting the line.

@bricoletc
Copy link
Collaborator

Thanks for spotting @Hugovdberg , I agree an error should be raised here

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

Successfully merging a pull request may close this issue.

3 participants