openSUSE / suse-doc-style-checker

Style Checker for SUSE Documentation
Other
2 stars 5 forks source link

Improve data structures used for storing terminology data #126

Open ghost opened 7 years ago

ghost commented 7 years ago

The current data structures used for terminology data are not easy to understand/work with: Currently there are three list elements that are iterated over in alignment, called "accepts" (proposed replacements and information about usage context), "patterns" (groups of main search patterns), "contextpatterns" (groups of patterns that are matched around the main search patterns). [More detail -> see def buildtermdata in __init__.py.]

This "iterating in alignment" thing is somewhat hairy and easy to get wrong (even though we do seem to get it right currently -- which is good) and it is in particular not maintainable.

Ideas to improve that area: