-
Notifications
You must be signed in to change notification settings - Fork 424
Closed
Labels
points: 3A few daysA few days
Description
node-newrelic/lib/util/sql/obfuscate.js
Lines 10 to 17 in d2fba9d
| // eslint-disable-next-line sonarjs/slow-regex | |
| const singleQuote = /'(?:''|[^'])*?(?:\\'.*|'(?!'))/ | |
| // eslint-disable-next-line sonarjs/slow-regex | |
| const doubleQuote = /"(?:[^"]|"")*?(?:\\".*|"(?!"))/ | |
| const dollarQuote = /(\$(?!\d)[^$]*?\$).*?(?:\1|$)/ | |
| const oracleQuote = /q'\[.*?(?:\]'|$)|q'\{.*?(?:\}'|$)|q'<.*?(?:>'|$)|q'\(.*?(?:\)'|$)/ | |
| // eslint-disable-next-line sonarjs/slow-regex | |
| const comment = /(?:#|--).*?(?=\r|\n|$)/ |
node-newrelic/lib/db/statement-matcher.js
Lines 8 to 10 in d2fba9d
| // ( ` database` . ` table ` ) | |
| // eslint-disable-next-line sonarjs/slow-regex | |
| const CLEANER = /^\(?(?:([`'"]?)(.*?)\1\.)?([`'"]?)(.*?)\3\)?$/ |
These regular expressions are triggering sonar-js's "slow regex" rule. We need to investigate what the regular expressions do, and see if we can improve them.
Metadata
Metadata
Assignees
Labels
points: 3A few daysA few days
Type
Projects
Status
Done: Issues recently completed