One of our rules is that all database joins have to be ANSI-style. As part of our build process I would like to scan all joins committed to source control for violations.
I got a partial answer which I will post below but I'm sure its missing something and there must be a better one.
Here is a non-comprehensive list of examples
Should match:
SELECT *
FROM cats, owners, dogs
WHERE cats.owner = onwers.id and owners.id += dogs.owner;
SELECT * FROM cats c, owners o WHERE c.owner = o.id;
Should not match:
SELECT *
FROM owners left outer join cats on (owners.id = cats.owner);
SELECT *
FROM owners inner join cats on (cats.owners = GetOnersOfTabbies(param1, parm2))