Marcia Oddi's Indiana Law blog has this interesting post regarding the case of the lawyer in Indiana who was subjected to bar discipline (a 30-day suspension, later reduced to a reprimand) because of a footnote he wrote in a brief, describing to the state's highest court just how lousy he thought was the opinion of the intermediate court of appeals.
I expect ethicalesq will weigh in on this matter. In Virginia, the ethics rules prohibit a lawyer from a public communication that "states or implies that the outcome of a particular legal matter was not or will not be related to its facts or merits." Rule 7.1(a)(2). This rule doesn't prohibit writing a brief that says the lower court got it wrong, but I guess it would be pretty bad to say the lower court wasn't even trying, which I guess is the Indiana Supreme Court concluded from the lawyer's footnoted remarks.
As noted in the margin (sometimes, when it works), I've been re-reading a book called The American Inquisition, and just finished a chapter on the legal travails of a group of lawyers who represented the leadership of the Communist Part of the United States in a famous trial. The trial judge found them all in contempt for the way they defended their clients, and they litigated the contempt sanctions and their bar status for years thereafter, including several appeals to the United States Supreme Court. The author's point was not so much that the lawyers did not deserve to be punished, but that their punishment was arbitrary and excessive. (And, they did say some bizarre and offensive things, from what is quoted in the book.)