IBM / report-toolkit

A toolkit for consumers of Node.js diagnostic Reports
https://ibm.github.io/report-toolkit
Other
84 stars 10 forks source link

Custom rules config does not working #102

Closed CatsMiaow closed 3 years ago

CatsMiaow commented 4 years ago

https://ibm.github.io/report-toolkit/config/#customizing-the-%22recommended%22-configuration

The setting values below do not working .rtkrc.js

exports.config = ['rtk:recommended', {
  rules: {
    'cpu-usage': true,
    'library-mismatch': false,
    'long-timeout': true,
    'memory-usage': true,
  },
}];
rtk --rc .rtkrc.js inspect report1.json

https://github.com/IBM/report-toolkit/blob/f009e704354dea4a8709a515e46c5930611567c2/packages/core/src/observable.js#L125-L126

Since the passed config.rules value is an object, there is no length property, so ruleIdsCount always returns 0

boneskull commented 3 years ago

hmm, okay, I'll look at this. thanks

boneskull commented 3 years ago

confirmed. will have a fix out shortly