You did the right thing.....recently I had a similiar situation with one of my clients; he took over a half completed new constuction, he claimed that the previos electrician had a series of code violations and that he documented each and every one. I advised him that before he does a stitch of work on the site that he have an independent inspector come in and write up the job (I advised him not to tell the inspector of his motivation for calling him in)I further advised him to serve a copy of the report on the GC before begining work. My concerns were that if the house burned down the two electricians would be pointing fingers at one another, so the independant inspectors report bails out the second electrician. Further, serving the GC with the violations, puts him on notice and pre-empts possible future litigation. Lastly, few inspectors are going to want to put there name to a document that points a finger on a potential future law suit, its one thing if they point out a violation to the electrian himself, but to say "hey if this house burns down or if anyone is injured...don't look at the second electrician, it was the first electrician's fault"

As far as a defamation/slander claim.....truth is an absolute defense to either. To say he did sloppy work is an opinion, if you stated the facts and the truth and only pointed out violations, your safe.

I say stand your ground.