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

Unhighlighted syntax error when a function call spans over multiple lines but starts at the same line as section #148

Closed
sharkovadarya opened this issue Jul 25, 2019 · 3 comments
Assignees
Labels
inspections Code inspections
Milestone

Comments

@sharkovadarya
Copy link
Contributor

This code compiles just fine:

rule foo:
    input: foo1("text1", "text2", "text3")

This, however, produces a compilation error:

rule foo:
    input: foo1("text1",
                "text2", "text3")

While this does not:

rule foo:
    input:
       foo1("text1",
            "text2", "text3")

Would be nice if such an error was highlighted as it is an easy mistake to make but the Snakemake error message (Expecting rule keyword, comment or docstrings inside a rule definition.) is not very helpful.

@sharkovadarya sharkovadarya added the parsing Parser Errors label Jul 25, 2019
@iromeo iromeo added inspections Code inspections and removed parsing Parser Errors labels May 11, 2020
@iromeo iromeo modified the milestones: Backlog, 0.8.x Jul 3, 2020
dakochik pushed a commit that referenced this issue Jul 23, 2021
@dakochik
Copy link
Contributor

Fixed:

multiline func call

dakochik pushed a commit that referenced this issue Jul 28, 2021
refactored: inspection code, SmkRuleOrCheckpointArgsSection got new function

We create separate method in SmkRuleOrCheckpointArgsSectionImpl in order not to duplicate code, if there any other SmkRuleOrCheckpointArgsSection inheritor, which will need the same logic e.g. 'use' section. Other variant is to move multilineSectionDefinition() implementation into SmkRuleOrCheckpointArgsSection interface but I'm not sure if it is a good idea to mix definition and implementation.

Resolves: #148
dakochik pushed a commit that referenced this issue Jul 29, 2021
@iromeo
Copy link
Contributor

iromeo commented Jul 29, 2021

@dakochik Please add a demo for the new quickfix

@dakochik
Copy link
Contributor

New quickfix:

multiline func call

@iromeo iromeo modified the milestones: 0.x, next major Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inspections Code inspections
Projects
None yet
Development

No branches or pull requests

3 participants