You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented a very in development tool for use with POSIX shells which does two things currently. Firstly, it rigorously validates the syntax of the script. Secondly, it reports back on stdout in a space-delimited fashion the programs used but which could not be found on any value found in $PATH. On error, a non-zero exit code is set with an error message, usually the like and column of a syntax error of the user's script where the error occurred.
This is great and all. But would this be of help to users of shellcheck to have some header like the following?
#! /usr/bin/env shif!command -v detect_programs_called_from_script > /dev/null 2> /dev/null
then
missing_programs=detect_programs_called_from_script <"$(pwd)"'/'"$0"if [ $?!= 0 ] ;thenecho"Script self-terminating early; detected syntax error"echo$missing_programsexit 1
fiif [ $missing_programs!="" ] ;thenecho"Script calls programs which could not be resolved."echo"These programs are: $missing_programs"exit 1
fifi
For many installers like Nvidia's or Guix's, this would be very helpful. But the use case may be too niche to bother with. There could also be outright technically superior alternatives which should be used instead. I don't know. I'm looking for some feedback.
The text was updated successfully, but these errors were encountered:
I have implemented a very in development tool for use with POSIX shells which does two things currently. Firstly, it rigorously validates the syntax of the script. Secondly, it reports back on stdout in a space-delimited fashion the programs used but which could not be found on any value found in $PATH. On error, a non-zero exit code is set with an error message, usually the like and column of a syntax error of the user's script where the error occurred.
This is great and all. But would this be of help to users of shellcheck to have some header like the following?
For many installers like Nvidia's or Guix's, this would be very helpful. But the use case may be too niche to bother with. There could also be outright technically superior alternatives which should be used instead. I don't know. I'm looking for some feedback.
The text was updated successfully, but these errors were encountered: