From: Harald Hoyer Date: Mon, 15 Mar 2021 11:26:28 +0000 (+0100) Subject: docs: document astyle in HACKING.md X-Git-Tag: 054~293 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b7b8eedab5e9852c8c99c794418cf7bfbf8ae9a5;p=thirdparty%2Fdracut.git docs: document astyle in HACKING.md --- diff --git a/HACKING.md b/HACKING.md index b8aed6125..d0969b8b8 100644 --- a/HACKING.md +++ b/HACKING.md @@ -14,12 +14,12 @@ Pull requests should be filed preferably on github nowadays. It is recommended, that you install a plugin for your editor, which reads in `.editorconfig`. Additionally `emacs` and `vim` config files are provided for convenience. -To reformat C files use `indent`: +To reformat C files use `astyle`: ```console -$ indent -i8 -nut -br -linux -l120 +$ astyle --options=.astylerc ``` -For convenience there is also a Makefile `indent` target `make indent`. +For convenience there is also a Makefile `indent-c` target `make indent-c`. To reformat shell files use `shfmt`: @@ -30,6 +30,8 @@ $ chmod u+x shfmt $ ./shfmt -w -s . ``` +or if `shfmt` is already in your `PATH`, use `make indent`. + Some IDEs already have support for shfmt. For convenience the `make indent` Makefile target also calls shfmt, if it is in `$PATH`.