summaryrefslogtreecommitdiff
path: root/doc/development/shell_scripting_guide/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/shell_scripting_guide/index.md')
-rw-r--r--doc/development/shell_scripting_guide/index.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/development/shell_scripting_guide/index.md b/doc/development/shell_scripting_guide/index.md
index f447a0e0e72..6071ae3a09d 100644
--- a/doc/development/shell_scripting_guide/index.md
+++ b/doc/development/shell_scripting_guide/index.md
@@ -1,7 +1,7 @@
---
stage: none
group: unassigned
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Shell scripting standards and style guidelines
@@ -21,7 +21,7 @@ deviations from this guide, they should be described in the
## Avoid using shell scripts
-CAUTION: **Caution:**
+WARNING:
This is a must-read section.
Having said all of the above, we recommend staying away from shell scripts
@@ -72,8 +72,8 @@ shell check:
- shellcheck scripts/**/*.sh # path to your shell scripts
```
-TIP: **Tip:**
-By default, ShellCheck will use the [shell detection](https://github.com/koalaman/shellcheck/wiki/SC2148#rationale)
+NOTE:
+By default, ShellCheck uses the [shell detection](https://github.com/koalaman/shellcheck/wiki/SC2148#rationale)
to determine the shell dialect in use. If the shell file is out of your control and ShellCheck cannot
detect the dialect, use `-s` flag to specify it: `-s sh` or `-s bash`.
@@ -92,7 +92,7 @@ use this job:
```yaml
shfmt:
- image: mvdan/shfmt:v3.1.0-alpine
+ image: mvdan/shfmt:v3.2.0-alpine
stage: test
before_script:
- shfmt -version
@@ -100,14 +100,14 @@ shfmt:
- shfmt -i 2 -ci -d scripts # path to your shell scripts
```
-TIP: **Tip:**
-By default, shfmt will use the [shell detection](https://github.com/mvdan/sh#shfmt) similar to one of ShellCheck
+NOTE:
+By default, shfmt uses the [shell detection](https://github.com/mvdan/sh#shfmt) similar to one of ShellCheck
and ignore files starting with a period. To override this, use `-ln` flag to specify the shell dialect:
`-ln posix` or `-ln bash`.
## Testing
-NOTE: **Note:**
+NOTE:
This is a work in progress.
It is an [ongoing effort](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/64016) to evaluate different tools for the