cabal-fmt icon indicating copy to clipboard operation
cabal-fmt copied to clipboard

Document `cabal-fmt` comment pragmas

Open elldritch opened this issue 3 years ago • 0 comments

It would be great if these were documented in README.md or in --help.

What are all the pragmas? The only one I'm aware of is cabal-fmt: expand DIR [EXCLUDE...] where each EXCLUDE is formatted as -Module e.g. cabal-fmt expand: app -Main.

However, looking through the source code seems to indicate that there are more pragmas: https://github.com/phadej/cabal-fmt/blob/a7ef55eaf5db2f9a623e7db39ad9bc38e7bc138f/src/CabalFmt/Pragma.hs#L58-L64

GitHub search seems to show more pragmas as well (at least a cabal-fmt: fragment and cabal-fmt: glob-files): https://github.com/search?q=%22cabal-fmt%3A+%22+extension%3Acabal&type=Code

elldritch avatar Aug 16 '21 18:08 elldritch