Skip to content

Commit 78725eb

Browse files
committed
CodingGuidelines: allow ${#posix} == strlen($posix)
The construct has been in POSIX for the past 10+ years, and we have used in t9xxx (subversion) series of the tests, so we know it is at portable across systems that people have run those tests, which is almost everything we'd care about. Let's loosen the rule; luckily, the check-non-portable-shell script does not have any rule to find its use, so the only change needed is a removal of one paragraph from the documentation. Helped-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b6d4d82 commit 78725eb

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Documentation/CodingGuidelines

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ For shell scripts specifically (not exhaustive):
9191

9292
- No shell arrays.
9393

94-
- No strlen ${#parameter}.
95-
9694
- No pattern replacement ${parameter/pattern/string}.
9795

9896
- We use Arithmetic Expansion $(( ... )).

0 commit comments

Comments
 (0)