Note: I'll add my opinion to individual rules once I experience enough of the issue related to it.
-
Full paths to binaries.
Some systems do not have default aliases for some of the CLIs installed (or that may be installed by the user). So it is quite often required to specify the absolute binary path.
-sudo sed -n '3,5p' textfile.txt +sudo /usr/bin/sed -n '3,5p' textfile.txt
Real-world example: artginzburg/sudo-touchid#13, when the
sed
command was installed in GNU operating system.A more popular example is the Docker Desktop application that specifies
/bin/bash
instead ofbash
when the user tries to open a container in the terminal, even if it is not actually required in the user's system.To get the absolute path of a command for your system, use the
which
command. Example:which sudo-touchid
=>/opt/homebrew/bin/sudo-touchid
. Note that a command may have many different paths in some cases, such as: different operating systems, different versions of the same OS, or if the command was installed using a non-standard package manager, etc.