Skip to content

Commit

Permalink
fix #22
Browse files Browse the repository at this point in the history
  • Loading branch information
hchiam committed Aug 9, 2019
1 parent 02900fe commit f5212f5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions visually-check-this.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5212f5

Please sign in to comment.