diff options
author | Michael Weiser <michael.weiser@gmx.de> | 2019-04-18 08:57:15 +0000 |
---|---|---|
committer | Michael Weiser <michael.weiser@gmx.de> | 2019-04-25 12:20:20 +0000 |
commit | 77d2ff1348a6f1ade05b54b297fc771abd0e14cd (patch) | |
tree | e7914e3ad89f36b65aced27f53132244f894832f /peekaboo/locale/de/LC_MESSAGES/peekaboo.mo | |
parent | e6c44a8ca3c2216904731e4d889e53473691c0dc (diff) |
Validate ruleset config
Validate the ruleset configuration at startup to inform the user about
misconfiguration and exit immediately instead of giving warnings during
seemingly normal operation. This also gives us a chance to pre-compile
regexes for more efficient matching later on.
We give rules a new method get_config() which retrieves their
configuration. This is called for each rule by new method the
validate_config() of the ruleset engine to catch errors. This way the
layout and extent of configuration is still completely governed by the
rule and we can interview it about its happiness with what's provided in
the configuration file.
As an incidental cleanup, merge class PeekabooRulesetConfig into
PeekabooRulesetParser because there's nothing left where it could and
would need to help the rules with an abstraction of the config file.
Also switch class PeekabooConfig to be a subclass of
PeekabooConfigParser so it can (potentially) benefit from the list
parsing code there. By moving the special log level and by-default-type
getters over there as well we end up with nicely generic config classes
that can benefit directly from improvements in the configparser module.
Update the test suite to test and use this new functionality.
Incidentally, remove the convoluted inheritance-based config testing
layout in favour of creating subclasses of the config classes.
Diffstat (limited to 'peekaboo/locale/de/LC_MESSAGES/peekaboo.mo')
-rw-r--r-- | peekaboo/locale/de/LC_MESSAGES/peekaboo.mo | bin | 4219 -> 4074 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/peekaboo/locale/de/LC_MESSAGES/peekaboo.mo b/peekaboo/locale/de/LC_MESSAGES/peekaboo.mo Binary files differindex 6cca488..c89b24b 100644 --- a/peekaboo/locale/de/LC_MESSAGES/peekaboo.mo +++ b/peekaboo/locale/de/LC_MESSAGES/peekaboo.mo |