(TMZ)-Lindsay Lohan has an incompetent lawyer representing her .... so says the judge in her criminal case.

It was shocking but Judge Jim Dabney reamed Mark Heller, saying he was incompetent to practice law in California and said Lindsay either has to get another lawyer who knows what he's doing or she has to come into court and waive her right to a competent California lawyer.

The judge informed Mark Heller he screwed up the legal docs he filed by not following California law ... and the motion to dismiss charges was DENIED. Heller tried to blame the previous lawyer, but his paperwork was so screwed up ... his argument fell on deaf ears.

The judge went on to say Heller doesn't have a clue about criminal law, questioning his competence to handle the case. The California lawyer who's sponsoring Heller to appear in Lindsay's case didn't show up today, and the judge made note of that ... not that it would really matter, because the sponsor never practiced law a day in her life.

Prosecutor Terry White made it clear ... he's ready for trial on March 18, where Lindsay will have to face the music in her lying-to-cops case.

Heller was short on the law but long on platitudes ... saying the judge needed to show Lindsay "mercy and compassion."

There was no mention made of the ongoing plea bargain negotiations. We broke the story ... lawyers on both sides discussed a plea this week but couldn't agree on a punishment.

Comments may be monitored for inappropriate content, but the station is under no legal obligation to do so.
If you believe a comment violates the above rules, please use the Flagging Tool to alert a Moderator.
Flagging does not guarantee removal.

Multiple violations may result in account suspension.
Decisions to suspend or unsuspend accounts are made by Station Moderators.
Questions may be sent to comments@kbtx.com.
Please provide detailed information.

Online Public Information File

Viewers with disabilities can get assistance accessing this station's FCC Public Inspection File by contacting the station with the information listed below. Questions or concerns relating to the accessibility of the FCC's online public file system should be directed to the FCC at 888-225-5322, 888-835-5322 (TTY), or fccinfo@fcc.gov.