Skip to content

Commit 7777fb8

Browse files
author
MarcoFalke
committed
doc: Remove shebang section
This is already checked by test/lint/lint-files.py There is no need to reword all linters into the dev notes. Also, allow scripts in Rust (there are already some).
1 parent faf65f0 commit 7777fb8

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

doc/developer-notes.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,27 +1123,7 @@ TRY_LOCK(cs_vNodes, lockNodes);
11231123
Scripts
11241124
--------------------------
11251125
1126-
Write scripts in Python rather than bash, when possible.
1127-
1128-
### Shebang
1129-
1130-
- Use `#!/usr/bin/env bash` instead of obsolete `#!/bin/bash`.
1131-
1132-
- [*Rationale*](https://github.com/dylanaraps/pure-bash-bible#shebang):
1133-
1134-
`#!/bin/bash` assumes it is always installed to /bin/ which can cause issues;
1135-
1136-
`#!/usr/bin/env bash` searches the user's PATH to find the bash binary.
1137-
1138-
OK:
1139-
```bash
1140-
#!/usr/bin/env bash
1141-
```
1142-
1143-
Wrong:
1144-
```bash
1145-
#!/bin/bash
1146-
```
1126+
Write scripts in Python or Rust rather than bash, when possible.
11471127
11481128
Source code organization
11491129
--------------------------

test/lint/lint-files.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
ALLOWED_PERMISSION_NON_EXECUTABLES = 0o644
2727
ALLOWED_PERMISSION_EXECUTABLES = 0o755
2828
ALLOWED_EXECUTABLE_SHEBANG = {
29+
# https://github.com/dylanaraps/pure-bash-bible#shebang:
30+
# `#!/bin/bash` assumes it is always installed to /bin/ which can cause issues;
31+
# `#!/usr/bin/env bash` searches the user's PATH to find the bash binary.
2932
"py": [b"#!/usr/bin/env python3"],
3033
"sh": [b"#!/usr/bin/env bash", b"#!/bin/sh"],
3134
}

0 commit comments

Comments
 (0)