Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Sep 18, 2024
2 parents ec944f4 + f69e289 commit 0d0bb84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rules/poppler.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"patterns": ["\\bPoppler C\\+\\+\\\b"],
"patterns": ["\\bPoppler C\\+\\+\\b"],
"dependencies": [
{
"packages": ["libpoppler-cpp-dev"],
Expand Down
4 changes: 4 additions & 0 deletions test/test-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const sysreqs = JSON.parse(fs.readFileSync(SYSREQS_FILE))

rules.forEach(rule => {
rule.patterns.forEach(pattern => {
// Test for syntax errors, like invalid escape sequences, using Unicode-aware mode.
// RegExp otherwise does not perform some of these syntax checks.
new RegExp(pattern, 'u')

const regexp = new RegExp(pattern, 'i')
const matched = sysreqs.filter(s => s.SystemRequirements.match(regexp))
console.log('pattern:', JSON.stringify(pattern))
Expand Down

0 comments on commit 0d0bb84

Please sign in to comment.