bash/inline-scripts
Finds inline Python and Node code, and heredocs piped into an interpreter, in shell scripts.
Part of the bash configuration, at the all level. It runs at the commit stage, per file. gspot runs this check itself.
No check reads code inside a heredoc.
What to do
Section titled “What to do”Move the embedded code into its own file and run that.
Example
Section titled “Example”A shell heredoc containing a Python program reports embedded code. Move the program into a .py file and invoke that file from the shell script.
Turn it off
Section titled “Turn it off”Turn it off for some files, with a reason:
gspot ignore bash/inline-scripts --paths "<glob>" --reason "<why>"