Skip to content

Add way to limit patterns to a specific package #11

@capnspacehook

Description

@capnspacehook

I'd like to create reassign rules that inform me if any stdlib globals are changed that shouldn't be, but I can't currently without worrying about many false positives. For example, one of the first symbols I'd like to check isn't modified is net/http.DefaultClient. Now I have to specify the pattern DefaultClient but that can match a symbol defined in another package.

I'd like to be able to specify that I only want to check that DefaultClient from the net/http package hasn't been reassigned. It'd be hard to do with how matching is done currently, with one big regex checking many patterns. Maybe users could specify a list of patterns and if they contain literal periods everything after the last period would be the symbol pattern to match against, and everything before the last period would be the package pattern to match against?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions