Use semicolons judiciously (EK00036)
Short, separate sentences read more clearly than clauses joined by a semicolon. Learn why to split them for clearer, more direct documentation.
Short, separate sentences read more clearly than two clauses joined by a semicolon, so break the clause in two. EkLine flags a semicolon that joins independent clauses and suggests splitting the sentence (rule EK00036).
Why split semicolons into separate sentences?
Section titled “Why split semicolons into separate sentences?”Semicolons join two ideas that often read better as standalone sentences, especially in instructions your audience skims. Splitting them shortens each thought and makes procedures easier to follow. Shorter sentences also translate more cleanly and reduce the chance a reader loses the thread mid-clause.
What EkLine flags
Section titled “What EkLine flags”EK00036 matches a semicolon that joins two independent clauses in a sentence.
- ❌ Incorrect: The build failed; check the logs for the cause.
- ✅ Correct: The build failed. Check the logs for the cause.
- ❌ Incorrect: Save your changes; then restart the service.
- ✅ Correct: Save your changes. Then restart the service.
How to fix
Section titled “How to fix”Replace the semicolon with a period and start a new sentence.
When is a semicolon acceptable?
Section titled “When is a semicolon acceptable?”A semicolon is the right choice when it separates list items that already contain commas, such as “Dublin, Ireland; Paris, France; and Tokyo, Japan.” Keep it in that case.
How do you fix a semicolon that joins two sentences?
Section titled “How do you fix a semicolon that joins two sentences?”Replace the semicolon with a period and start a new sentence. For example, “The build failed; check the logs” becomes “The build failed. Check the logs.”
Rule details
Section titled “Rule details”| Property | Value |
|---|---|
| Rule ID | EK00036 |
| Category | Spelling and grammar |
| Default severity | Suggestion |
| Enabled by default | No |
Ignore this rule
Section titled “Ignore this rule”To keep a semicolon on one line, add an inline comment:
<!-- ekline-ignore-next-line EK00036 -- semicolons separate list items with commas -->The regions are Dublin, Ireland; Paris, France; and Tokyo, Japan.To disable the rule across your project, add it to the ignore list in your configuration file.