Skip to content

Commit

Permalink
Fix unescaped regexp chars and remove SQ exclusion (#4257)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-sonar authored Oct 9, 2023
1 parent 7cd8026 commit 0bd6d4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const QUICKFIX_DESCRIPTION_PATTERN = RegExp(
'fix@(?<quickfixId>\\w+)' +
// message, ex: {{msg}}
' *(?:\\{\\{(?<message>.*?)\\}\\}(?!\\}))? *' +
'(?:\r(\n?)|\n)?',
'(?:\\r(\\n?)|\\n)?',
);

const QUICKFIX_CHANGE_PATTERN = RegExp(
Expand All @@ -45,7 +45,7 @@ const QUICKFIX_CHANGE_PATTERN = RegExp(
'\\]\\])?' +
// contents to be applied, ex: {{foo}}
' *(?:\\{\\{(?<contents>.*?)\\}\\}(?!\\}))?' +
' *(?:\r(\n?)|\n)?',
' *(?:\\r(\\n?)|\\n)?',
);

type ChangeType = 'add' | 'del' | 'edit';
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<!-- sonar analysis -->
<sonar.sources>packages/</sonar.sources>
<sonar.exclusions>packages/**/*.test.ts,packages/**/*.fixture.*,packages/**/fixtures/**/*,packages/jsts/tests/tools/testers/comment-based/helpers/quickfixes.ts</sonar.exclusions>
<sonar.exclusions>packages/**/*.test.ts,packages/**/*.fixture.*,packages/**/fixtures/**/*</sonar.exclusions>
<sonar.tests>packages/</sonar.tests>
<sonar.test.inclusions>packages/**/*.test.ts</sonar.test.inclusions>
<sonar.javascript.lcov.reportPaths>coverage/lcov.info</sonar.javascript.lcov.reportPaths>
Expand Down

0 comments on commit 0bd6d4e

Please sign in to comment.