diff --git a/package-lock.json b/package-lock.json index fba5a48..80455a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "custom-vscode-linter", - "version": "0.7.1", + "version": "0.7.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index eb9948d..5bb3166 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "custom-vscode-linter", "displayName": "custom-vscode-linter", "description": "Custom VSCode Linter!", - "version": "0.7.1", + "version": "0.7.2", "publisher": "hchiam", "repository": { "type": "git", diff --git a/src/extension.ts b/src/extension.ts index fbd95d2..cc70d48 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -99,7 +99,7 @@ export function activate(context: vscode.ExtensionContext) { function check_encryptedSQL(rangesToDecorate: vscode.DecorationOptions[]) { // cover "AS BEGIN" // cover "AS--WITH ENCRYPTION BEGIN" but missing "--comment: sp_password" after it - let regex = /(AS(?!--WITH ENCRYPTION)[\r\n\s]+BEGIN[\r\n\s]*|AS *--WITH ENCRYPTION[\r\n\s]+BEGIN(?![\r\n\s]*--comment: sp_password))/g; + let regex = /(AS(?!--WITH ENCRYPTION)[\r\n\s]+BEGIN[\r\n\s]*|AS *--WITH ENCRYPTION[\r\n\s]+BEGIN[\r\n\s]*(?! *?-- *?comment: sp_password).+)/g; let hoverMessage = 'AS BEGIN should have "AS--WITH ENCRYPTION" and "BEGIN -- comment: sp_password"'; let popupMessage = 'AS BEGIN should have "AS--WITH ENCRYPTION" and "BEGIN -- comment: sp_password"'; genericCheck(regex, hoverMessage, popupMessage, rangesToDecorate); diff --git a/visually-check-this.js b/visually-check-this.js index d5ddf1b..cabb451 100644 --- a/visually-check-this.js +++ b/visually-check-this.js @@ -85,6 +85,13 @@ AS--WITH ENCRYPTION BEGIN // YES +// NO: +AS--WITH ENCRYPTION + +BEGIN + + -- comment: sp_password + Number(someOkThing); // NO Number(someID); // YES Number(something.someId); // YES