Skip to content

Commit 0570234

Browse files
committed
EA-90807
1 parent 9c93e6d commit 0570234

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/com/goide/inspections/GoPlaceholderCountInspection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ private static boolean checkPrintfArgument(@NotNull ProblemsHolder holder,
212212
char flag = flags.charAt(i);
213213
if (v.getFlags().indexOf(flag) == -1) {
214214
String message = String.format("Unrecognized <code>#ref</code> flag for verb %s: %s call #loc", v.getVerb(), flag);
215-
TextRange range = TextRange.create(fmtPlaceholder.getStartPos() + 1, fmtPlaceholder.getPlaceholder().length() + 1);
215+
TextRange range = TextRange.from(fmtPlaceholder.getStartPos() + 1, fmtPlaceholder.getPlaceholder().length());
216216
// TODO florin: add quickfix to suggest correct printf verbs (maybe take type into account when type info available?)
217+
// TODO florin: cover with tests
217218
holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, range);
218219
return false;
219220
}

0 commit comments

Comments
 (0)