From 7e89fa681c9acdb5aee99f460d5033b696c5d01a Mon Sep 17 00:00:00 2001
From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com>
Date: Mon, 20 Jul 2020 14:52:56 -0500
Subject: [PATCH] fixed langauge logic

---
 lib/linter.sh | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/lib/linter.sh b/lib/linter.sh
index a4371723..41abb56f 100755
--- a/lib/linter.sh
+++ b/lib/linter.sh
@@ -830,7 +830,7 @@ CallStatusAPI() {
     -H 'content-type: application/json' \
     -d "{ \"state\": \"$STATUS\",
       \"target_url\": \"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\",
-      \"description\": \"$MESSAGE\", \"context\": \"  --> Lint-Language/$LANGUAGE\"
+      \"description\": \"$MESSAGE\", \"context\": \"--> Linted: $LANGUAGE\"
     }" 2>&1)
 
   #######################
@@ -892,10 +892,18 @@ Footer() {
       CallStatusAPI "$LANGUAGE" "error"
     else
       # No errors found
-      #########################################
-      # Create status API for Failed language #
-      #########################################
-      CallStatusAPI "$LANGUAGE" "success"
+
+      ###############################################
+      # Create Validate language var from Var input #
+      ###############################################
+      VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}"
+
+      ######################################
+      # Check if we validated the langauge #
+      ######################################
+      if [ "${!VALIDATE_LANGUAGE}" == "true" ]; then
+        CallStatusAPI "$LANGUAGE" "success"
+      fi
     fi
   done