Nicola Sturgeon did not breach ministerial code, inquiry finds