1
0
mirror of https://github.com/sasjs/lint.git synced 2025-12-10 17:34:36 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
Allan Bowe
9984a373df Merge pull request #195 from sasjs/issue-140
fix: update regex to handle single quotes in macro options
2023-01-02 12:21:22 +01:00
0c79a1ef85 fix: update regex to handle single quotes in macro options 2023-01-02 16:11:10 +05:00
Allan Bowe
0bd57489b7 Update README.md 2022-12-30 12:25:45 +00:00
2 changed files with 2 additions and 3 deletions

View File

@@ -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

View File

@@ -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)