A common pattern is to assign a channel to a field of a struct and either call
a method on the struct which affects the channel in some way or returning the struct.
Potential fix:
check if the channel is used on the right side of an AssignStmt or a DeclStmt via a simple Ident and check if the left handside is a SelectorExpr or a CompositeList .
If it is just return a parseError
https://github.com/github/git-sizer/blob/951a51bd37e5e3454850d471b05d9d51d4851b74/git/git.go#L445
A common pattern is to assign a channel to a field of a struct and either call a method on the struct which affects the channel in some way or returning the struct.
Potential fix:
check if the channel is used on the right side of an AssignStmt or a DeclStmt via a simple Ident and check if the left handside is a SelectorExpr or a CompositeList . If it is just return a parseError