github-vet / github-vet/bots

Track anonymous functions

Open
#127 0 comments 0 reactions 0 assignees View on GitHub
discussion enhancement false-positive vet-bot
Dominant language
Go
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

There are a few cases where anonymous functions are used in reported findings. The current tool misreports them either as third-party, or, if their signature matches a declared function, yields a false-positive.

In theory, these could be tracked, *if* the anonymous function being used appears as an argument in a function declaration. That would allow us to match up the function signatures and consider each anonymous function declared in the codebase with a matching signature as a candidate "declaration". We could then trace any calls found whose signature matches the argument with the candidate declarations.

This probably won't be implemented as it's a substantial change, but it's a possibility in case we find a lot of reports that could use it.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the handling of reported findings, anonymous functions, function declarations, signatures, and calls. Done means anonymous functions used as declaration arguments are tracked, matching candidates are considered declarations, and matching calls no longer produce the described misreports or false positives.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.