aboutsummaryrefslogtreecommitdiff
path: root/doc/developer-notes.md
diff options
context:
space:
mode:
authorvim88 <vim88vim88@gmail.com>2018-11-28 22:43:18 +0200
committervim88 <vim88vim88@gmail.com>2018-12-02 16:14:21 +0200
commit688f665a5e526fda0fb797bf617412fe9cbe64fd (patch)
tree5a9dc35e71cfd69c01a5c6a9aa18282483b2538b /doc/developer-notes.md
parent60b20c869f8df9a81b5080ebcbe8c9cf4e6b9d77 (diff)
Scripts and tools & Docs: Used #!/usr/bin/env bash instead of obsolete #!/bin/bash, added linting for .sh files shebang and updated the Developer Notes.
Diffstat (limited to 'doc/developer-notes.md')
-rw-r--r--doc/developer-notes.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index bb477d4be0..42885ac1d4 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -28,6 +28,8 @@ Developer Notes
- [Strings and formatting](#strings-and-formatting)
- [Variable names](#variable-names)
- [Threads and synchronization](#threads-and-synchronization)
+ - [Scripts](#scripts)
+ - [Shebang](#shebang)
- [Source code organization](#source-code-organization)
- [GUI](#gui)
- [Subtrees](#subtrees)
@@ -602,6 +604,31 @@ TRY_LOCK(cs_vNodes, lockNodes);
}
```
+Scripts
+--------------------------
+
+### Shebang
+
+- Use `#!/usr/bin/env bash` instead of obsolete `#!/bin/bash`.
+
+ - [*Rationale*](https://github.com/dylanaraps/pure-bash-bible#shebang):
+
+ `#!/bin/bash` assumes it is always installed to /bin/ which can cause issues;
+
+ `#!/usr/bin/env bash` searches the user's PATH to find the bash binary.
+
+ OK:
+
+```bash
+#!/usr/bin/env bash
+```
+
+ Wrong:
+
+```bash
+#!/bin/bash
+```
+
Source code organization
--------------------------