Skip to content

Commit

Permalink
If a TODO message is too big, clip it.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Jun 17, 2023
1 parent 15d36bd commit c21002c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ private void check(int i, int j, IDocument document, List<MarkerInfo> lst, List<
}

String message = tok.substring(index).trim();
if (message.length() > 1024) {
// todo messages shouldn't have more than 1024 chars
// (we could go up to 65535 bytes, but it seems pointless for a
// todo comment).
message = message.substring(0, 1024) + " ...";
}
String markerType = IMarker.TASK;
int severity = IMarker.SEVERITY_WARNING;
boolean userEditable = false;
Expand Down

0 comments on commit c21002c

Please sign in to comment.