XD What documents you checking mate?
I'm here rocking thucydides as my primary. Who you got?
Almost every classical historian alive will tell you the greeks fought in semi coherent mobs. The spartans were slightly (and I mean slightly) more organized using music to keep an even pace, which other classical greeks did not do, so when they advanced there was no way for them to tell how to keep pace, meaning parts of the line would bulge. Then they would charge without much consideration of formation, opening all sorts of gaps in their lines, but hoping the shock would carry the day (if it did not, then you get some seriously bloody battles as mobs of hoplites mush together in a rough line and murder each other relatively slowly)
Coherent ranks and files is attested in the hellenic period, which is after the classical period. And after hoplites (as defined as a guy carrying a hoplon, you know, that big ol' shield) when greek armies were mostly using pikes. We don't have a lot of great sources for the classical powerhouses of athens and sparta militarily at this time (and neither power was actually important in the period. Sparta tried twice to rebuild its wider empire and macedon trivially trounced them both times), and the dominant city state of Thebes were burned to the ground by alexander and so we have very little for them too, but we DO have good sources of the macedonians, and how easily they folded the existing city state and ethnos militaries into their own phalangite system.
The Greeks advanced in coherent ranks to within charge distance, and ATTEMPTED to maintain those ordered ranks on the final charge as best they could. Apparently, both sides typically charged a SHORT distance, and met somewhere in the middle, with only modest disruption.
There were several ploys used, such as faking a charge so the enemy would charge almost the entire distance and begin to scatter before the REAL charge was ordered. Taking a charge at the halt risked getting overwhelmed by the inertia of the charging side, but allowed for a more orderly formation if you were able to hold. In several mentioned situations, the armies approached without charging, and spent the better part of the day poking and jabbing from maximum spear range, with no decisive outcome. In at least one confrontation, the two sides pressed together, turning it into a shoving match to topple the opposing front rank over backwards, with multiple ranks behind them all adding weight to the push. There's very little mention of disorderly "mob" attacks except under unusual circumstances, such as when attacked unexpectedly while encamped, or in broken terrain.
Roman tactics under Gaius Julius (later known as "Caesar") were often similar, with a methodical approach, then a brief halt to throw pila or javelins, followed by a short charge to contact. Again, tricks were sometimes used to disrupt the opposing charge or disorder their ranks. Anything beyond that short charge distance risked a disordered front line and high casualties.
Even the bronze age clashes show signs of having been conducted in orderly ranks (aside from a few preliminary contests between opposing champions), and even the Stele of Vultures depicts a row of spearmen with large shields in tight formation.
Macedonia packed more spear points into a smaller area by use of longer pikes and forgoing the large shields. That doesn't mean that the Greeks fought as disorderly mobs.
The tactics of warfare were modified and improved over time, and new tricks learned, but the imperative to dress that line and maintain a solid wall of shields still carries into modern march traditions. It's not about aesthetics: if you don't maintain that firm shield wall, you die.
Thucydides stated a lot of clearly incorrect "facts", as did virtually every other writer of antiquity, since the primary aim was to tell a good story, with historical accuracy as a secondary goal at best. One has to treat their writings with about the same level of skepticism as one would for a modern Hollywood production "based on" a historical incident.