From d9b3473867e8f4faf7f7e0e870dc0dad5344aa0e Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 14 Oct 2020 10:31:55 -0500 Subject: [PATCH] add warning: --- lib/buildFileList.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index 15a581cd..afcb72f4 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -89,6 +89,16 @@ function BuildFileList() { fatal "[${RAW_FILE_ARRAY[*]}]" fi + ########################################################################## + # Check to make sure the raw file array is not empty or throw a warning! # + ########################################################################## + if [ ${#RAW_FILE_ARRAY[@]} -eq 0 ]; then + ############################### + # No files were found to lint # + ############################### + warn "No files were found in the GITHUB_WORKSPACE:[${GITHUB_WORKSPACE}] to lint!" + fi + ################################################ # Iterate through the array of all files found # ################################################