Skip to content

Commit

Permalink
EA-90807
Browse files Browse the repository at this point in the history
  • Loading branch information
zolotov committed Oct 29, 2016
1 parent 9c93e6d commit 0570234
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/com/goide/inspections/GoPlaceholderCountInspection.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ private static boolean checkPrintfArgument(@NotNull ProblemsHolder holder,
char flag = flags.charAt(i);
if (v.getFlags().indexOf(flag) == -1) {
String message = String.format("Unrecognized <code>#ref</code> flag for verb %s: %s call #loc", v.getVerb(), flag);
TextRange range = TextRange.create(fmtPlaceholder.getStartPos() + 1, fmtPlaceholder.getPlaceholder().length() + 1);
TextRange range = TextRange.from(fmtPlaceholder.getStartPos() + 1, fmtPlaceholder.getPlaceholder().length());
// TODO florin: add quickfix to suggest correct printf verbs (maybe take type into account when type info available?)
// TODO florin: cover with tests
holder.registerProblem(placeholder, message, ProblemHighlightType.GENERIC_ERROR_OR_WARNING, range);
return false;
}
Expand Down

0 comments on commit 0570234

Please sign in to comment.