Skip to content

Fix a false positive in regexp rule

This MR is based upon !62 (closed) which has the following description. This MR adds a CHANGELOG and tests.

What does this MR do?

This comment will fix a false positive in the gitlab.eslint.detect-non-literal-regexp rule. After running semgrep and eslint rules on the (lodash)[https://github.com/lodash/lodash/commit/2f79053d7bc7c9c9561a30dda202b3dcd2b72b90] repository, semgrep flagged on (this)[https://github.com/lodash/lodash/blob/2f79053d7bc7c9c9561a30dda202b3dcd2b72b90/test/merge.test.js#L201] codeline that eslint did not flag on. This is a false positive because we are only concerned about calls to new Regexp that have an argument passed into the call.

Does this MR meet the acceptance criteria?

Edited by Lucas Charles

Merge request reports