proselint
proselint copied to clipboard
[feature-proposal] streamline module-structure
while modernizing the codebase I had some thoughts on the check-structure I'd like to implement:
- get rid of the misc-category and move these checks into root-level to keep it flatter, example:
misc.numbers.check_xyz
would becomenumbers.check_xyz
- every FN in check-script-file should be interpreted as a check, so checks can be adressed by
numbers.xyz
and notnumbers.check_xyz
. this makes the structure cleaner and individual selection can be granular on check-level - in addition to 2): generalize check-name with an exception, if there is a
disabled_
,beta_
or betterpreview_
in front (or appendix) of it to mark faulty- or beta-checks (just use one of them and allow enabling that preview-class via cli-argument) - num 2) & 3) would also allow to remove boilerplate
err = "name"
and autogenate it - maybe add a shortname instead, like PNS001 to allow disabling it in config
- establish a rule-system for when to use files and directories, ie.
oxymorons
-dir has only one file with one check in it and should be a file. directories should only be used when there are real subcategories, which is a distinction to sub-checks in a file. - divide checks into static ones that can have precompiled regex (faster startup) and dynamic ones (url-checker, ...) that can't be pre-compiled
update: for making it future-safe:
- add language-metadata to allow other checks for specific languages or even general ones
- add keywords-metadata for selecting groups of checks like general, prose, nsfw, scientific,