summaryrefslogtreecommitdiff
path: root/doc/contributing.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-01-02 17:29:12 +0100
committerLudovic Courtès <ludo@gnu.org>2022-01-10 14:59:26 +0100
commitc4fe13c294cc1e31dd8a49ce3981f603fb169e0a (patch)
treee5d5136d502ebfdc62e862d0f7b325d5bf86ef2b /doc/contributing.texi
parent6f892630ae4726297944fe34b3de4fb608caf66d (diff)
downloadguix-c4fe13c294cc1e31dd8a49ce3981f603fb169e0a.tar.gz
guix-c4fe13c294cc1e31dd8a49ce3981f603fb169e0a.tar.xz
style: Add '--styling' option.
* guix/scripts/style.scm (format-package-definition): New procedure. (%options, show-help): Add "--styling". (%default-options): Add 'styling-procedure'. (guix-style): Honor it. * tests/style.scm (with-test-package) ("input labels, 'safe' policy") ("input labels, 'safe' policy, nothing changed") ("input labels, margin comment") ("input labels, margin comment on long list") ("input labels, line comment") ("input labels, modify-inputs and margin comment"): Pass "-S inputs". * etc/indent-code.el: Remove. * doc/contributing.texi (Formatting Code): Mention "guix style" instead of "etc/indent-code.el". (Submitting Patches): Add item for "guix style". * doc/guix.texi (Invoking guix style): Document "-S" and update.
Diffstat (limited to 'doc/contributing.texi')
-rw-r--r--doc/contributing.texi18
1 files changed, 8 insertions, 10 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 72f5ce1e0e..9f97788c0b 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -959,17 +959,11 @@ If you do not use Emacs, please make sure to let your editor knows these
rules. To automatically indent a package definition, you can also run:
@example
-./etc/indent-code.el gnu/packages/@var{file}.scm @var{package}
+./pre-inst-env guix style @var{package}
@end example
@noindent
-This automatically indents the definition of @var{package} in
-@file{gnu/packages/@var{file}.scm} by running Emacs in batch mode. To
-indent a whole file, omit the second argument:
-
-@example
-./etc/indent-code.el gnu/services/@var{file}.scm
-@end example
+@xref{Invoking guix style}, for more information.
@cindex Vim, Scheme code editing
If you are editing code with Vim, we recommend that you run @code{:set
@@ -1039,6 +1033,10 @@ name of the new or modified package, and fix any errors it reports
(@pxref{Invoking guix lint}).
@item
+Run @code{guix style @var{package}} to format the new package definition
+according to the project's conventions (@pxref{Invoking guix style}).
+
+@item
Make sure the package builds on your platform, using @code{guix build
@var{package}}.
@@ -1175,8 +1173,8 @@ Examples of unrelated changes include the addition of several packages,
or a package update along with fixes to that package.
@item
-Please follow our code formatting rules, possibly running the
-@command{etc/indent-code.el} script to do that automatically for you
+Please follow our code formatting rules, possibly running
+@command{guix style} script to do that automatically for you
(@pxref{Formatting Code}).
@item