#1082928 checkbashisms: False positives for ((()...)),

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Clarence "Sparr" Risher
Date:
2024-09-29 11:45:02 UTC
Severity:
normal
#1082928#5
Date:
2024-09-28 13:55:09 UTC
From:
To:
Dear Maintainer,

While running checkbashisms against my system I encountered a number of
false positives and a few other apparent misbehaviors. The attached patch
makes the following changes:

False positive fixes:
Ignore "((" if the second "(" is closed by a single ")".
Ignore ${RANDOM if it's followed by /:?[=?-]/ which indicates probably-
appropriate fallback behavior.
Ignore "[[" in a frequent pattern used by scripts from the XDG project.

Suggested syntax fix:
replace ' with " in the suggested "printf -v" replacement

Minor improvement:
Include the trailing "}" in a match of "${RANDOM"


This bug is being filed from a non-debian system. I apologize for any tooling
misbehavior or incorrect information.

#1082928#16
Date:
2024-09-29 11:40:38 UTC
From:
To:
The title of this bug report should be as follows:

checkbashisms: False positives for ((()...)), ${RANDOM:, XDG scripts

I apologize for the event spam from my failed attempts to correct it.

I have also filed a bug report with a patch to fix the original omission of
the subject/title. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082932