Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(checks): do not normalize options for custom checks #2435

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

straker
Copy link
Contributor

@straker straker commented Aug 4, 2020

Prevent breaking change to custom check options. Moved the metadataFunctionMap to the private test object as it was suppose to be there to begin with and not on the private audit object.

#Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner August 4, 2020 17:14
Comment on lines +208 to +209
// only merge and normalize options for internal checks
if (this._internalCheck) {
Copy link
Contributor

@WilcoFiers WilcoFiers Aug 4, 2020

Choose a reason for hiding this comment

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

I think we allow deep merge for any non-array object

Suggested change
// only merge and normalize options for internal checks
if (this._internalCheck) {
// only merge and normalize options for internal checks
if (typeof this.options === 'object' && !Array.isArray(this.options)) {

@straker straker merged commit 83056ad into develop Aug 4, 2020
@straker straker deleted the fix-options branch August 4, 2020 19:40
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.

2 participants