Most checks are performed based on data that is exported to files. This is because an function on bash can normally only return 1 (or 2) variables (possibly more in the form of a list).
Yet variables being returned from a function directly make testing it less convoluted. It is assumed that testing a function output directly instead of via a file is preferred. Furthermore, it is assumed that the code becomes more entangled/spagettified if each variable is passed and returned throughout multiple functions. However while typing it out, this seems to be the preferred programming approach, where a single variable is passed around in a controlled fashion instead of arbitrary file output that may be affected and read out by various functions at arbitrary moments.
Hence it is assumed that it is preferred to output as little variables/data to files as possible for verification/later use, and to maximise the amount of variables that are returned at the end of a function.
[ ] Identify all cases where variables are outputted to file, and then read into a variable again somewhere.
[ ] Convert as much as possible of these variables that are outputted to file, into variables that are returned from functions and passed towards their needed locations.
Most checks are performed based on data that is exported to files. This is because an function on bash can normally only return 1 (or 2) variables (possibly more in the form of a list).
Yet variables being returned from a function directly make testing it less convoluted. It is assumed that testing a function output directly instead of via a file is preferred. Furthermore, it is assumed that the code becomes more entangled/spagettified if each variable is passed and returned throughout multiple functions. However while typing it out, this seems to be the preferred programming approach, where a single variable is passed around in a controlled fashion instead of arbitrary file output that may be affected and read out by various functions at arbitrary moments.
Hence it is assumed that it is preferred to output as little variables/data to files as possible for verification/later use, and to maximise the amount of variables that are returned at the end of a function.
If the assumption is verified: