mirror of
https://github.com/armbian/bash-util.git
synced 2026-01-06 10:37:49 -08:00
update contributing.md
This commit is contained in:
@@ -37,19 +37,19 @@ Before making a pull request, make sure to follow below guidelines:
|
||||
- Try using bash builtins and string substitution as much as possible.
|
||||
- Use printf everywhere instead of echo.
|
||||
- Before adding a new logic, be sure to check the existing code.
|
||||
- Make sure to add the function in appropriate section based on its operation.
|
||||
- Use [shfmt](https://github.com/mvdan/sh) to format the script. Use below command:
|
||||
|
||||
```shell
|
||||
shfmt upload.sh
|
||||
```
|
||||
|
||||
The repo already provides the .editorconfig file, which shfmt reads, so no need for extra flags.
|
||||
|
||||
You can also install shfmt for various editors, refer their repo for information.
|
||||
|
||||
Note: This is strictly necessary to maintain consistency, do not skip.
|
||||
```shell
|
||||
shfmt upload.sh
|
||||
```
|
||||
|
||||
The repo already provides the .editorconfig file, which shfmt reads, so no need for extra flags.
|
||||
You can also install shfmt for various editors, refer their repo for information.
|
||||
Note: This is strictly necessary to maintain consistency, do not skip.
|
||||
|
||||
- Script should pass all [shellcheck](https://www.shellcheck.net/) warnings, if not, then disable the warning and give a valid reason.
|
||||
|
||||
#### Bashdoc guideline
|
||||
The documentation is generated based on the function documentation within the script file. So ensure to follow the style so the documentation is
|
||||
properly generated by the generator.
|
||||
|
||||
Reference in New Issue
Block a user