Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Add detection of Snakefile #112

@HDembinski

Description

@HDembinski

Copied from atom/atom#20382

Description

https://snakemake.readthedocs.io/en/stable/ is a popular tool in data science. It parses so-called "Snakefile"s which are similar to "Makefile"s.

The grammar selector detects a "Snakefile" as source.python, but it should be source.yaml. This causes issues with linters and autoformatters like python-black, which should not be run for Snakefiles.

Steps to Reproduce

  1. Generate a file called "Snakefile" with the following content:
import glob

rule all:
    input: ["data/foo.root", "data/bar.root"]

rule make_foo:
    input: "{name}.root"
    output: "{name}_pv.root"
    shell: "./make_foo.py {input} {output}"
  1. Open file in Atom, it is detected as python.source.

Expected behavior:

The grammar selector should detect a "Snakefile" as source.yaml.

Actual behavior:

The grammar selector detects a "Snakefile" as source.python.

Reproduces how often:

Always.

Versions

Atom : 1.43.0
Electron: 4.2.7
Chrome : 69.0.3497.128
Node : 10.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions