analyze_types: better support for type aliases
The recently merged semantic analysis has one drawback when dealing with type aliases: they always get replaced with the underlying type. Example:
package somepkg
import "example.com/anotherpkg"
type SomeType = anotherpkg.AnotherType
A pattern somepkg.SomeType.ForbiddenMethod does not match because SomeType is an alias. What works is anotherpkg.AnotherType.ForbiddenMethod.
This is a) unexpected and b) can cause a pattern that works with a version of a package where the type is not an alias to stop working when the packages switches to a type alias.
It would be better if forbidigo matched against both the underlying type (anotherpkg.AnotherType) and the alias (somepkg.SomeType).
The problem is that in many cases, we get the underlying type from static code analysis:
https://github.com/ashanbrown/forbidigo/blob/1396000fa337b0f684b38a5206b36964d9573b39/forbidigo/forbidigo.go#L273-L285
I'm not sure whether it is possible to detect that the type was reached through an alias.