Separate independent clauses with a comma only when they are joined by a coordinating conjunction.
This is not as complicated as it sounds. A comma splice occurs when you use a comma without and, but, for, nor, or, so, or yet (these are the coordinating conjunctions) when joining two clauses. Grammar-checkers won't always catch comma splices; however, you can correct a comma splice by dividing the two clauses into separate sentences, by replacing the comma with a semicolon, by subordinating one of the clauses, or by adding a coordinating conjunction.
1. It snowed all night, none of the paths were plowed this morning.
Comma splice. Try two sentences: It snowed all night. None of the paths were plowed this morning.
2. The students looked sleepier than usual, they had sat up most of the night studying for the exam.
Comma splice. Try a coordinating conjunction: The students looked sleepier than usual, for they had....
3. I have been proofreading this paper all day, I can no longer see my errors.
Apparently. Comma splice. Try subordinating the first clause: Because I have been proofreading this paper all day, I can no longer....
4. She had eaten nothing but lettuce all week, however she still couldn't fit into her black pants.
Comma splice. Try a semicolon: She had eaten nothing but lettuce all week; however, she still.... Note that however is a conjunctive adverb, not a coordinating conjunction.