-
Notifications
You must be signed in to change notification settings - Fork 89
[Suggestion] Add module configuration extendability #126
base: master
Are you sure you want to change the base?
Conversation
strictKeywords: true, | ||
removeAdditional: true, | ||
useDefaults: true | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removeAdditional
- remove additional (nondocumented) properties from config object. Might be useful to force module developers documenting all possible config values.
useDefaults
- if property is not defined and has default value will modify config object by injecting the property with default value. Just handy.
] | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To generate reasonable documentation (help) we can enforce by tests things like:
- each config should have an example (that is up to date and passes schema test)
- each property has a title and a type
- ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we can try to use this definition for cli arguments. Not sure how hard it will be if we want to make it good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... or limit cli arguments to what we have now and allow to pass .hawkeyerc
as an argument or even read it from stdIn
Currently, when executing
|
@felixhammerl Any comments on this? |
A possible way to add configuration to individual modules
To try out documentation
./bin/hawkeye modules config files-secrets