A Virginia circuit court judge dismissed a lawsuit yesterday that accused Fairfax County supervisors of imposing excessive real estate taxes and funneling too much money into a contingency fund.

Judge Lewis Hall Griffith ruled that no evidence had emerged during a full day of testimony to support the Fairfax County Taxpayers Alliance's complaint that the county's planned $20.4 million fund is unreasonably large. County officials maintained during a hearing Thursday that the reserve is needed in the current recession to offset unanticipated expenses or shortfalls in revenue.

Alliance president James W. Roncaglione called the decision a "travesty for the taxpayers" and a "crying shame." No appeal of the ruling is planned, but Roncaglione said his group will seek to make the reserve fund an issue in next year's County Board elections.

Commonweath's Attorney Robert F. Horan Jr., who represented the Alliance, had argued that the $20.4 million figure, or 3.6 percent of the county's budgeted expenses for the fiscal year beginning next Thursday, was excessive.

Stressing that the county has consistently underestimated its surpluses, Horan charged that the reserve was meant to placate the investment services that have granted Fairfax a top-ranked AAA bond rating. The reserve for the current fiscal year, first budgeted at $8 million, is now projected to be nearly $16 million when the current fiscal year ends Wednesday.

Judge Griffith did voice concern about the increasing size of county surpluses. "If the trend continues and the surpluses continue to get larger, I would have great concerns as to their reasonableness," he said as he announced his ruling yesterday morning.

"This $20 million [for fiscal 1983] is a slush fund that protects us forever from Standard & Poor's," Horan had argued Thursday, referring to the major investment-rating service. "The county should not be at the mercy of the bond brokers."

Horan further charged that while the county makes a sizable return by investing the money from the reserve, "the taxpayers out there are as entitled to play the financial markets as is Fairfax County."

The county held that the reserve, which is the largest the county has ever proposed, was necessary because of the state of the economy. "We are now in a period that is almost unique since the Depression," testified James P. McDonald, the deputy county executive for management and budget.

McDonald said the reserve was also needed to offset potential shortfalls in federal and state aid, as well as a possible lower tax collection rate in fiscal 1983. "These are treacherous times," he said. "I cannot pinpoint where the potential shortfalls are going to come."

The county also said it had been informed by Standard & Poor's that it should maintain its reserve at a minimum 2 percent of expenses to protect the AAA rating.

Only nine counties in the country currently have a AAA rating from both major investment services, Standard & Poor's and Moody's. The rating generally ensures that the county's bonds will be in high demand and enables the county to pay a lower yield on its bonds. McDonald said in testimony that Fairfax County had saved nearly $10 million in interest payments since l978 because of its AAA rating.

The suit was brought against the Board of Supervisors under a little-used Virginia law that requires a commonwealth's attorney to appeal a tax levy to the circuit court when petitioned by 1 percent of the registered voters of the county.