A customer has written a Linux/MacOS script that scans the network for adjacent switches (via EDP and LLDP) and compares the ports. He checks for VLAN names that differ, if VLANs are present on both ends and so on, quite sophisticated. I cannot share the entire script (at least not without his consent), but I might be able to help you out a bit if that's a suitable solution for you.
/Fredrik