diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-09-04 23:28:06 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-09-05 18:44:46 +0200 |
commit | 5ed999651ec89bfbc1ab1e8283b40ae2476a02da (patch) | |
tree | 2004538be054b1556674421098b45dd1bf1f3715 /doc | |
parent | 749603e2faa6f44c26883cac83c41faad6b81fd4 (diff) | |
download | clufter-5ed999651ec89bfbc1ab1e8283b40ae2476a02da.tar.gz clufter-5ed999651ec89bfbc1ab1e8283b40ae2476a02da.tar.xz clufter-5ed999651ec89bfbc1ab1e8283b40ae2476a02da.zip |
Reconsider plugin (class/symbol) to module organization
This is a preparation work for being able to pick up plugin of choice
nicely without the necessity of scanning the whole name/path space
followed with some initialization routines across all plugins even if
they won't be used for sure. Such heavy-weight approach is fine for
using clufter as CLI tool (covering potentially any available use-case),
not so much for the use as a library with presumably a priori determined
task to perform.
As generally one module can (and often is practical!) contain several
modules, we are introducing following convention to allow our proposed
filtering to have a good false-positives/convenience ratio:
module shall contain only plugins the name of which contains
the same prefix as the module's filename does, where the prefix
is assumed the part before first occurrence of '_'
('-' for stringified/decorated plugin names)
As a concrete example, formats/ccs.py module contains ccs and ccs_flat
plugins, hence when ccs_flat is to be picked with this fine granularity
and using default search path, only formats/ccs.py file will match
the prefix test and hence only ccs and ccs_flat will be prepared
for further use (one false positive in this case is a result of the
mentioned trade-off).
This commit normalizes the plugin-module allocation to follow
the convention, reflects these changes in tests, etc. and adds a note
to the HACKING doc file.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/HACKING | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/HACKING b/doc/HACKING index 65fe57e..8edb472 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -130,6 +130,9 @@ Notable points - one particular filter can only occur once in the command's filter chain + - all symbols in the module for particular plugin shall share the common + prefix (mutually and also with respective module), which is considered + till the first underscore (if any, in static view, dash in live-one) x. to ease the perception of embedded XSLT snippets in the Python files, there is respective _vimrc_local.vim provided (in filters/cluster) |