diff --git a/package-lock.json b/package-lock.json index 80455a1..e7dabaf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "custom-vscode-linter", - "version": "0.7.2", + "version": "0.7.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5bb3166..2b58547 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.2", + "version": "0.7.3", "publisher": "hchiam", "repository": { "type": "git", diff --git a/src/extension.ts b/src/extension.ts index cc70d48..3267b27 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\t]+BEGIN[\r\n\s\t]*|AS *\t?--WITH ENCRYPTION[\r\n\s\t]+BEGIN[\r\n\s\t]*(?! *?\t?-- *?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 cabb451..7249e8f 100644 --- a/visually-check-this.js +++ b/visually-check-this.js @@ -92,6 +92,10 @@ BEGIN -- comment: sp_password +AS--WITH ENCRYPTION +BEGIN + --comment: sp_password // NO + Number(someOkThing); // NO Number(someID); // YES Number(something.someId); // YES