Order of Control-file execution



I want to control the order in which controls of a single profile are executed and I cannot find out how the order is arranged.

For example, the following files are in the /controls/ folder:

I want Inspec to execute 01 before 02. i.e. How can I arrange the files in such a way so I can be assured that file-X is executed before file-Y?



I found the answer; The order in which control files are exected can not be defined (it is dependent on the type of file system you are using).

However, I found the inspec code (source-reader) in which the filenames within the controls folder are being added into an Array. If this Array of filenames could be sorted, my issue is resolved.