From 692c8fd96acf5ef4ef6965c1318816f8ed0f764f Mon Sep 17 00:00:00 2001 From: jjvilleg Date: Thu, 22 Mar 2018 14:04:35 -0500 Subject: [PATCH] Resolved lint issue --- generator-liberty/lib/assert.liberty.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/generator-liberty/lib/assert.liberty.js b/generator-liberty/lib/assert.liberty.js index 30c948a..f2a6f87 100644 --- a/generator-liberty/lib/assert.liberty.js +++ b/generator-liberty/lib/assert.liberty.js @@ -105,14 +105,15 @@ function AssertLiberty() { check.content('wlp-webProfile7:' + libertyVersion); } if (buildType === 'maven') { - const groupId = 'com.ibm.websphere.appserver.runtime'; - const artifactId = 'wlp-webProfile7'; + const groupId = escapeStringRegexp('com.ibm.websphere.appserver.runtime'); + const artifactId = escapeStringRegexp('wlp-webProfile7'); + const version = escapeStringRegexp(libertyVersion); - const content = '\s*' + groupId + '\s*' + artifactId + '\s*' + libertyVersion + '\s*zip\s*'; - const exp = escapeStringRegexp(content); + const content = '\\s*' + groupId + '\\s*' + artifactId + '\\s*' + version + '\\s*zip\\s*'; - console.log("expression: " + exp); - const regex = new RegExp(exp); + console.log("expression: " + content); + const regex = new RegExp(content); + check.content(regex); } }