Skip to content

Match patterns against canonical object name instead of source text

Compare
Choose a tag to compare
@ashanbrown ashanbrown released this 13 Feb 01:49
· 10 commits to master since this release
1396000

This release adds a new matching engine based that matches rules on the canonical name of a package attribute or function instead of raw text as it appears in the source code. It also adds support for a mode where a rule is matched based on the canonical name of a type or interface (see the current README for details). This latter mode requires loading type information from dependencies, which could slow down analysis for things like pre-commit hooks, so it is currently disabled by default. Thanks to @pohly for proposing this change, and for the months he put in to implement it in a way that we hope will cause minimal disruption to existing rules. There are some cases where this may new matching engine may break existing behavior, but we believe the number of such cases will be minimal and have chosen not to consider this a major version release. The release also allows scoping a rule to match from a particular package using a regex.