-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Labels
Description
In lint_group.rs we can add linters in three ways:
- Call
add()manually. - Call
add_chunk_expr_linter(). - Use the
insert_struct_rulemacro. This callsadd() - Use the
insert_expr_rulemacro. This callsadd_chunk_expr_linter()
Since add_chunk_expr_linter() specifically works only for the Chunk Unit and provides caching that ExprLinters use for efficieny, this leaves no way for an ExprLinter that uses Sentence to make use of caching.
At the moment there are no such linters but I'm exploring linters which look for semantic context by checking all words in the surrounding sentence context against a list of keywords.
This does work with add() but will not benefit from caching.
I briefly looked at adding it but it seems to be more involved than I expected, so filing this instead since I might move on to other problems.