Skip to content

Commit

Permalink
fix #21
Browse files Browse the repository at this point in the history
  • Loading branch information
hchiam committed Aug 7, 2019
1 parent 3a34192 commit 02900fe
Show file tree
Hide file tree
Showing 4 changed files with 10 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.1",
"version": "0.7.2",
"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]+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);
Expand Down
7 changes: 7 additions & 0 deletions visually-check-this.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 02900fe

Please sign in to comment.