I see this one all the time in politics and political discussion, typically as a discrediting tactic. It is always fallacious.
P1) Person B holds view X.
P2) Person A also holds view X.
C) Person A thus holds view X and all other views person B has; alternatively
P1) Person B holds views W, X, Y, Z...
P2) Person A holds view X
P3) ( implicit ) A person who holds one view in common with someone else holds all their other views on the issue
C) Person A also holds views W, Y, Z...
This is a Non Sequitur ; it cannot follow logically that someone agrees with another person on every single issue simply because they agree with them on one topic. The implicit premise P3 is thus false and ridiculous (though it is technically logically valid in the second form because the argument is set up with that premise to lead to that conclusion).
In politics, it is also typically a way of using Guilt by Association to make someone seem worse because they hold the same view as a member of an unacceptable out-group ("so you support Trump, huh?")
The most hilarious thing about this is that it can easily be flipped the other way. Say a progressive (person A) disagrees with 'identity politics', sharing views with a conservative (person B). To say that person A is therefore guilty by association is clearly politically motivated; why isn't person B instead "honoured" by associating with the more progressive person A?