snakemake / snakefmt

The uncompromising Snakemake code formatter
MIT License
153 stars 29 forks source link

[feature request] format shell script block using shfmt? #170

Closed y9c closed 1 year ago

y9c commented 1 year ago

How about wrap shfmt (https://github.com/mvdan/sh) to format shell script blocks. It can avoid trouble that an extra space causes the snakemake to re-run the code.

Snakemake now re-run pipeline by default when code changed. But it does not detect the content of the code. Thus, even an empty space or an indent is added, the pipeline will be re-run. But if shfmt can standardize the code. This problem can be avoided.

mbhall88 commented 1 year ago

Thanks for the request. I don't think formatting people's shell scripts is within the scope of this project. Additionally, this would add an external dependency to snakefmt, which I dont think is necessary.