style: '-S format' canonicalizes comments.
authorLudovic Courtès <ludo@gnu.org>
Sun, 2 Jan 2022 17:14:00 +0000 (18:14 +0100)
committerLudovic Courtès <ludo@gnu.org>
Mon, 10 Jan 2022 13:59:26 +0000 (14:59 +0100)
commit5d9a5e230189347ba6f5b78a3d74b36a867aa9e6
tree68360d1d116fa767274eae10043a5dd41a505293
parentc4fe13c294cc1e31dd8a49ce3981f603fb169e0a
style: '-S format' canonicalizes comments.

* guix/scripts/style.scm (canonicalize-comment): New procedure.
(pretty-print-with-comments): Add #:format-comment. and honor it.
(object->string*): Add 'args' and honor them.
(format-package-definition): Pass #:format-comment to
'object->string*'.
* tests/style.scm ("pretty-print-with-comments, canonicalize-comment"):
New test.
guix/scripts/style.scm
tests/style.scm