How come Snape didn't get punished for using sectumsempra on james in the memory?

Even if james didnt complain it was like snape said "dark magic", so how come did no student complain to get him in trouble as he was clearly "unpopular"

and harry gets detention every saturday until end of term