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

distill options passed into transformers #35

Closed boneskull closed 4 years ago

boneskull commented 5 years ago

Currently, we're sending whole gobs of configuration to transformers when we don't need to. Each transformer should probably define the options that it expects (e.g. via a schema like Rules support), and we can use that to pick the various useful options.

Configuration can be passed via:

  1. Command-line flags (if supported)
  2. Top-level via RC file
  3. Command-specific via RC file
  4. Transform-specific via RC file

Furthermore, default options should cascade within a transformer chain. If an option defines e.g., fields, and the user has not, this setting should pass to the next transformer(s) in the chain as long as those transformers accept the configuration. The target transformer should prefer the config sent from the previous transformer and treat it like it was user-defined.

boneskull commented 4 years ago

duplicate of #78 imo