Conversation
|
|
||
| let requests = db.Request.filter(req => req.parentId === workspaceId); | ||
| if (options.requestNamePattern) { | ||
| requests = requests.filter(req => req.name.match(new RegExp(options.requestNamePattern))); |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: javascript.lang.security.audit.detect-non-literal-regexp.detect-non-literal-regexp
6083765 to
db642a8
Compare
ihexxa
left a comment
There was a problem hiding this comment.
Just added some minor comments.
| const options = { | ||
| reporter: defaultReporter, | ||
| ...__configFile?.options || {}, | ||
| ...commandOptions, |
There was a problem hiding this comment.
nit: just double check that command options will be overridden by the config file? Original I thought command options might have highest priority.
| return process.exit(1); | ||
| } | ||
|
|
||
| const db = await loadDb({ |
There was a problem hiding this comment.
Probably we could be a bit defensive here and check loadDb failure.
There was a problem hiding this comment.
I agree the db load logic is over complex I'm thinking of a better way to abstract it. Will follow up with a pr soon
| logger.log(`Running request: ${req.name} ${req._id}`); | ||
| const res = await sendRequest(req._id); | ||
| logger.trace(res); | ||
| if (res.status !== 200) { |
There was a problem hiding this comment.
nit: Just a todo item that we might check test results to decide if it is failed in the future.
inso run collectionfuture work
thoughts