IDE new hint suggestion

IDE new hint suggestion

if Condition then
    Str := 'SomeString';
    i := 5;
ShowMessage(Str);

Warning: suspect indentation at line 3

I'm not sure it will not be too verbose, but It can probably fix a lot of bugs ;)

Comments

  1. I always use "begin-end" or "{}", it's always clear and fewer mistakes, sure, it adds 2 lines of code per condition check/loop, but it's well worth it.

    ReplyDelete
  2. OH GOD YES!!! I LOVE THIS ONE!!!! Whoever decided to add this one deserves a medal, a Presidential citation and a raise!

    ReplyDelete
  3. Dorin Duminica yes, but I'm not the author of all the code I have to work with ;) reformatting the code will hide the problem, a warning is probably the best solution.

    ReplyDelete
  4. Paul TOTH there was an IDE plugin advertised a few weeks ago that adds this kind of hints and warnings, I don't recall the name, but I'm 99% sure that the developer can add that functionality

    ReplyDelete
  5. Dorin Duminica FixInsight. And I am not sure it can provide information about indentation. But Roman Yankovsky can answer this I am sure.

    ReplyDelete
  6. Stefan Glienke thank you, that's the one, I think Roman Yankovsky can add that quite rapidly and make a sale (:

    ReplyDelete
  7. That's why I always use a begin...end pair around even single statements.

    ReplyDelete
  8. Nick Hodges happy man who does not maintain a 10-year old application that he has not written ;)

    ReplyDelete
  9. Paul TOTH​ aka "the real world"

    ReplyDelete

Post a Comment