Skip to content

refactor(sarif): replace the trailing positional parameters with an options object - #1284

Open
prx-my wants to merge 2 commits into
OWASP:mainfrom
prx-my:refactor/issue-1244-sarif-options-object
Open

prx-my wants to merge 2 commits into
OWASP:mainfrom
prx-my:refactor/issue-1244-sarif-options-object

Conversation

@prx-my

@prx-my prx-my commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Closes #1244.

Converts the trailing optional parameters of the two SARIF entry points to a
single options object, keeping findings, lockfileUri, version and plan
positional:

  • buildSarifOutput(findings, lockfileUri, version, plan, options?)
  • writeSarifReport(findings, lockfileUri, plan, options?)

options carries overrideFindings, maintenanceFindings, licenseFindings
and overrideSkipped; the writer adds outputDir. Behaviour is unchanged.

Replaces the two brittle write-outputs tests that asserted call arity and the
full positional list with assertions on the options object. Call sites that pass
only the leading arguments are untouched.

Verified: npm run lint:tests, npm run build, advisories sync,
npm test (163 suites / 2249 tests).

Copilot AI balanced review requested due to automatic review settings October 3, 2026 19:56
@prx-my
prx-my requested a review from sonukapoor as a code owner October 3, 2026 19:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@prx-my

prx-my commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Update: this branch has been refreshed with the latest main. It is no longer behind and now only awaits the required review/status checks before it can merge.

@prx-my
prx-my force-pushed the refactor/issue-1244-sarif-options-object branch from 8a8e18f to fd84108 Compare October 8, 2026 11:46
@prx-my
prx-my force-pushed the refactor/issue-1244-sarif-options-object branch from fd84108 to 01001a2 Compare October 8, 2026 11:50

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(sarif): replace the eight positional parameters with an options object

2 participants