snakefmt icon indicating copy to clipboard operation
snakefmt copied to clipboard

Is there an official order of sections?

Open nickp60 opened this issue 3 years ago • 5 comments
trafficstars

Not sure if this has been discussed elsewhere, but is there an official order that the different directives should be written? And if there is would it be possible to have snakefmt enforce that order?

nickp60 avatar Jun 21 '22 14:06 nickp60

Hello, interesting question.

That sounds like something the linter should be in charge of, not the formatter- are you aware of the linter?. I suspect it currently doesn't warn about that though.

bricoletc avatar Jun 21 '22 15:06 bricoletc

I use both the linter and the the formatter, and I haven't seen it warn about this.

nickp60 avatar Jun 21 '22 17:06 nickp60

This is a really interesting question and something I have also often wondered about!

It would be nice to have a unified ordering. This might best be handled by a separate tool though - analogous to isort and black for python.

mbhall88 avatar Jun 21 '22 23:06 mbhall88

Great idea to standardize order, like isort for imports! I would happily use such a tool (in case anyone feels like writing one).

corneliusroemer avatar Jun 19 '23 15:06 corneliusroemer

I'm struggling to maintain this repo let alone create a new one 😭

mbhall88 avatar Jun 19 '23 23:06 mbhall88