It has been a fascinating 2018 for the SNP, but seldom in a good way.

It was a strange lull for Nicola Sturgeon’s party, the first year since 2013 without an election or a referendum to animate it. Arguably, it was the first such year for a decade, given 2013 was so dominated by the independence fight.

It showed. The SNP lacked its usual dynamo.

The absence of a campaign put the spotlight on to its record rather than its aspirations, and demonstrated why the First Minister and other politicians love a good contest.

Making promises is so much easier than keeping them.

After years in door-knocking mode, the SNP ranks got antsy. Where was the referendum they had been promised? Surely Ms Sturgeon’s talk of a “triple lock mandate” the previous year wasn’t just a piece of rhetorical thistledown?

Troubled by the listlessness at the top, the Yes movement took it on itself to organise.

A series of marches organised by the All Under One Banner group brought tens of thousands on to the streets of cities around Scotland through the spring and summer.

In the SNP deputy leadership race, Inverclyde councillor Chris McEleny stood on an explicit platform of a second referendum in 2019.

His rivals felt compelled to talk up the prospect of another vote too, although they were more circumspect about dates.

Nor did the party’s long-lost Growth Commission allay activist jitters when it finally appeared.

Andrew Wilson’s revised economic blueprint for independence was more curds and vinegar than milk and honey. The left of the party baulked at its hairshirt focus on deficit reduction and its plan to keep sterling.

More tensions bubbled to the surface at the SNP’s October conference, with MP Angus Macneil telling his party not to “dither like the Jacobites at Derby” when they gave up their march on London.

Other MPs suggested independence might arrive via an unidentified “democratic event” rather than a referendum, given Theresa May refused to grant the latter.

It was hardly a schism, but such  shows of frustration and doubt with the leadership are rare in the modern SNP.

Citing the delays and muddle over Brexit, the First Minister backed away from her pledge to give a “precise timescale” for Indyref2 in the autumn, kicking her announcement into the New Year - for now - and making a People’s Vote on Brexit her priority, even though  another EU referendum would not leave enough time for a new independence vote before 2021. 

By December, even Alex Salmond was questioning his successor’s appetite for a second referendum, wondering on his RT TV show if the “Caledonian lifeboat” would ever be launched.

The former first minister was a key part of the SNP’s grim year. In January, two female civil servants made sexual misconduct complaints against him relating to 2013.

It would be another seven months, after an investigation overseen by Permanent Secretary Leslie Evans, that their existence would enter the public domain.

When they did, the effect was explosive. Furious at the way the case had been handled, Mr Salmond launched a judicial review against the government he once led and quit the SNP after 45 years as a member, 20 as its leader, to spare it “internal division”.

It took him barely three days to crowdsource £100,000 to pay for the legal action.

Ms Sturgeon publicly backed Ms Evans. Battle lines were drawn. Mr Salmond reportedly refers to his former protegee as Lady Macbeth and is gunning for one of her key aides.

When the judicial review hearing starts at the Court of Session two weeks today, Mr Salmond and Ms Sturgeon’s government will play for keeps. A polarising fight could see SNP members take sides. It is a moment the party should dread.

The SNP’s accumulating internal problems were mirrored in office. There were undoubted high spots. The introduction of minimum unit pricing – after a five-year campaign by the drinks industry to block it – was a global moment in public health.

The reorganisation of income tax into five bands, albeit under pressure from the Scottish Greens, was another bold change. Derek Mackay’s decision not to copy Tory tax cuts in England and Wales for the wealthy has continued the experiment, despite flak about a cross-border tax gap.

But in education, Ms Sturgeon’s top priority, and in health, which consumes almost half the Scottish revenue budget, the Government’s record has been lamentable.

There is no expectation that NHS waiting time or treatment targets will be hit any more. When the monthly stats come out, the only question is how badly they will be missed.

Demonstrating how much tougher it is to run a delivery department than shuffle money, former finance secretary John Swinney has toiled in the education brief.

In June, he was forced to halt his flagship school reform bill because of a lack of support. To give him cover for this woeful climbdown, Ms Sturgeon reshuffled her Cabinet the same day, getting shot of Shona Robison from health and Keith Brown from economy.

But the excitement at the promotion of a new generation of ministers didn’t last long. In a blog written long before she became an MSP, Gillian Martin had written about “hairy knuckled, lipstick-wearing transgender laydees”.

Despite its existence  being reported in 2016, no one in government read it for the reshuffle. Ms Martin became the mayfly minister, in charge of higher education for a day, then gone. Ms Sturgeon’s judgment was put under the microscope and found wanting.

Mr Swinney was also humiliated by MSPs voting against standardised testing for P1 pupils, and by some councils refusing to implement it.

The first teachers’ strike in a generation is looming over pay.

But as Ms Sturgeon’s deputy, he remains unsackable.

At health, Jeane Freeman has come clean about problems she has inherited, writing off £150 million of emergency loans to health boards they can’t repay and admitting “legally binding” waiting time guarantees will be missed until 2021.

However Audit Scotland continues to warn of cash problems in health as well as across local government, where reserves are being run down to an alarming degree.

It’s been no picnic on the railways either, with ScotRail’s performance hitting record lows, and Transport Secretary Michael Matheson impotently huffing and puffing at the franchise holder Abellio.

Worse, he waived sanctions for their lousy service after accepting much of the blame lay with Network Rail, which is owned by the UK Government. The SNP’s plan to merge British Transport Police and Police Scotland north of the Border was aborted.

As with much of Brexit, the fights of a few months ago, so intense at the time, seem dim and distant. In the spring, Ms Sturgeon and Michael Russell led a cross-party Continuity Bill through Holyrood to avoid a ‘power grab’ of devolved competencies.

But the Supreme Court effectively gutted it after a challenge by the UK government delayed its Royal Assent and allowed Westminster’s EU Withdrawal Act to supersede it.

Mr Russell also threatened to gum up the constitutional works by withholding consent for any Brexit-related Bill that came to Holyrood under the Sewel convention, then quietly backed down in the face of a Bill that was needed to give Scots health cover after Brexit.

Despite all that, Ms Sturgeon remains a top-flight politician.

In the last year, she has successfully portrayed Scotland as a beacon of stability amid the roiling chaos of Brexit. Her attacks on Jeremy Corbyn for vacillating over the biggest political issue in a generation have struck home. Her early emphasis on customs and single market continuity has been adopted by other parties.

But turning the calendar on 2018 will not put her problems behind her. The SNP’s basic plan in government – keep things simmering along inoffensively until there’s a Yes vote – looks uninspiring and timid, even in its own ranks.

Brexit also seems to have given voters their fill of constitutional upheaval. There is little appetite for a second independence referendum.

The weary “will she, won’t she” dance about the timing of another vote is likely to reach its anti-climax soon.

If there is no general election or People’s Vote in 2019, the focus on Scotland’s public services will intensify, and it will not be to the SNP’s advantage. Mr Salmond’s day in court is nigh. The police continue their investigations.

Any party in power as long as the SNP is self-evidently a “mature” government. The question for 2019 is whether it is now entering infirmity.