From 7777fb8bc749e18c178ef460b65219187e676128 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 20 May 2025 18:06:44 +0200 Subject: [PATCH] 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). --- doc/developer-notes.md | 22 +--------------------- test/lint/lint-files.py | 3 +++ 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 7516f86e84b..5c99a7a33e7 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -1123,27 +1123,7 @@ TRY_LOCK(cs_vNodes, lockNodes); Scripts -------------------------- -Write scripts in Python rather than bash, when possible. - -### 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 -``` +Write scripts in Python or Rust rather than bash, when possible. Source code organization -------------------------- diff --git a/test/lint/lint-files.py b/test/lint/lint-files.py index 681785acd23..c5af959e0a8 100755 --- a/test/lint/lint-files.py +++ b/test/lint/lint-files.py @@ -26,6 +26,9 @@ ALLOWED_SOURCE_FILENAME_EXCEPTION_REGEXP = ( ALLOWED_PERMISSION_NON_EXECUTABLES = 0o644 ALLOWED_PERMISSION_EXECUTABLES = 0o755 ALLOWED_EXECUTABLE_SHEBANG = { + # 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. "py": [b"#!/usr/bin/env python3"], "sh": [b"#!/usr/bin/env bash", b"#!/bin/sh"], }