From fc9d45e49d7761b7e3695c441d3a50f5261e51c4 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 4 Feb 2020 08:56:53 -0600 Subject: [PATCH] fixing bad cases --- .automation/test/coffeescript/coffeescript_bad_1.coffee | 8 ++++---- .automation/test/javascript/javascript_bad_1.js | 9 +++++---- .automation/test/python/python_good_1.py | 2 -- lib/linter.sh | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.automation/test/coffeescript/coffeescript_bad_1.coffee b/.automation/test/coffeescript/coffeescript_bad_1.coffee index c307948e..624cb3cd 100644 --- a/.automation/test/coffeescript/coffeescript_bad_1.coffee +++ b/.automation/test/coffeescript/coffeescript_bad_1.coffee @@ -26,7 +26,7 @@ dropHammer = [ ################### thanks = [ "You're welcome! Piece of cake...", - "It was nothing..." + It was nothing... "De nada...", 'Danke...' "Bitte...", @@ -36,13 +36,13 @@ thanks = [ ################################# # Start the robot for listening # ################################# -module.exports = (robot) -> +module.exports = (robot) -> ) ############################## # Show the adapter connected # ############################## robot.respond /ADAPTER$/i, (msg) -> - msg.send robot.adapterName + msg.send robot.adapterNameS ########################## # Echo back the response # @@ -73,7 +73,7 @@ module.exports = (robot) -> # Hubot Ping # ############## robot.respond /PING$/i, (msg) -> - msg.sned "PONG" + msg.sned PONG ####################### ####################### diff --git a/.automation/test/javascript/javascript_bad_1.js b/.automation/test/javascript/javascript_bad_1.js index c2c104bb..9f2fae8d 100644 --- a/.automation/test/javascript/javascript_bad_1.js +++ b/.automation/test/javascript/javascript_bad_1.js @@ -1,10 +1,11 @@ var http = require('http') -var createHandler = require('github-webhook-handler') -var handler = createHandler({ path: '/webhook', secret: (process.env.SECRET) }) +var createHandler = require( 'github-webhook-handler') -var userArray = ['user1'] +var handler = createHandler( { path : /webhook, secret : (process.env.SECRET) }) -var teamDescription = 'Team of Robots' +var userArray = [ 'user1' ] + +var teamDescription = Team of Robots var teamPrivacy = 'closed' // closed (visibile) / secret (hidden) are options here var teamName = process.env.GHES_TEAM_NAME diff --git a/.automation/test/python/python_good_1.py b/.automation/test/python/python_good_1.py index 75a6eeb8..a679ffa2 100644 --- a/.automation/test/python/python_good_1.py +++ b/.automation/test/python/python_good_1.py @@ -15,7 +15,6 @@ import os.path import commands import sys - ########### # GLOBALS # ########### @@ -59,7 +58,6 @@ def StartJob(): #print "Response:[%s]" % (response) if (response.status_code != 201): print "Failed to Launch Jenkins job:[%s]!" % (jenkinsJob) - exit(1) #print response.status_code #print response.json() diff --git a/lib/linter.sh b/lib/linter.sh index ef629732..d6380423 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1171,7 +1171,7 @@ LintCodebase() if [[ $FILE == *"node_modules"* ]]; then # This is a node modules file continue - elif [[ $FILE == *".automation/test" ]]; then + elif [[ $FILE == *"$TEST_CASE_FOLDER" ]]; then # This is the test cases, we should always skip continue fi