JetBrains-Research / snakecharm

Plugin for PyCharm / IntelliJ IDEA Platform IDEs which adds support for Snakemake language.
MIT License
61 stars 7 forks source link

Inspection for "expand" invocations #298

Open dievsky opened 4 years ago

dievsky commented 4 years ago

It would be nice to have an inspection for missing wildcards in expand expressions, e.g.

expand("{w1}_{w2}", w1="value")

should produce a warning because this statement can never succeed.

iromeo commented 4 years ago

A suggested example is rather trivial and users will rarely have bugs in such simple case. Much more useful is to allow this inspection to work with cases like: input: expand(rules.sort_tophat_bams.output, sample=SAMPLES, allow_missing=True) where:

rule sort_tophat_bams:
    output: temp("sorted/{genome}/tophat_{sample}_{genome}.bam")

It is important to cover different widely used scenarios here, e.g. when reference is to: