Skip to content

New check: visit_ function with no generic_visit/visit #313

@jakkdl

Description

@jakkdl

This is kind of super niche, and mostly just of interest to flake8 plugin writers in particular, but I accidentally forgot to continue visit'ing in a couple functions I wrote recently in flake8-trio and realized it'd be incredibly handy - and very easy to implement - an optional check where if a function name matches visit_* it raises a warning if there's no self.visit(...) or self.generic_visit(...) within it's body.

I imagine it'd be nice to have that in the CI for flake8-bugbear itself as well, even though your structure makes it less likely than it is for flake8-trio currently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions