From 0bd57489b75d6f923867fc5d6e68839bfd223cd9 Mon Sep 17 00:00:00 2001 From: Allan Bowe <4420615+allanbowe@users.noreply.github.com> Date: Fri, 30 Dec 2022 12:25:45 +0000 Subject: [PATCH 1/2] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 4fa0a07..d7ffe96 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -[![License](https://img.shields.io/apm/l/atomic-design-ui.svg)](/LICENSE) ![GitHub top language](https://img.shields.io/github/languages/top/sasjs/lint) [![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/sasjs/lint)](https://github.com/sasjs/lint/issues?q=is%3Aissue+is%3Aclosed) [![GitHub issues](https://img.shields.io/github/issues-raw/sasjs/lint)](https://github.com/sasjs/lint/issues) @@ -130,7 +129,7 @@ We strongly recommend a line length limit, and set the bar at 80. To turn this f Capture zero-width whitespace and other non-standard characters. The logic is borrowed from the [VSCode Gremlins Extension](https://github.com/nhoizey/vscode-gremlins) - if you are looking for more advanced gremlin zapping capabilities, we highly recommend to use their extension instead. -The list of characters can be found in this file: [https://github.com/sasjs/lint/blob/main/src/rules/line/noGremlins.ts](https://github.com/sasjs/lint/blob/main/src/rules/line/noGremlins.ts) +The list of characters can be found in this file: [https://github.com/sasjs/lint/blob/main/src/utils/gremlinCharacters.ts](https://github.com/sasjs/lint/blob/main/src/utils/gremlinCharacters.ts) - Default: true - Severity: WARNING From 0c79a1ef85fed57f1ec14786b5462c6a44c30338 Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Mon, 2 Jan 2023 16:11:10 +0500 Subject: [PATCH 2/2] fix: update regex to handle single quotes in macro options --- src/rules/file/strictMacroDefinition.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rules/file/strictMacroDefinition.ts b/src/rules/file/strictMacroDefinition.ts index 5076ec6..726d7ec 100644 --- a/src/rules/file/strictMacroDefinition.ts +++ b/src/rules/file/strictMacroDefinition.ts @@ -110,7 +110,7 @@ const processOptions = ( const severity = config?.severityLevel[name] || Severity.Warning if (optionsPresent) { - const regex = new RegExp(/="(.*?)"/, 'g') + const regex = new RegExp(/=["|'](.*?)["|']/, 'g') let result = regex.exec(optionsPresent)