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 ;)
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 ;)
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.
ReplyDeleteOH GOD YES!!! I LOVE THIS ONE!!!! Whoever decided to add this one deserves a medal, a Presidential citation and a raise!
ReplyDeleteDorin 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.
ReplyDeletePaul 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
ReplyDeleteDorin Duminica FixInsight. And I am not sure it can provide information about indentation. But Roman Yankovsky can answer this I am sure.
ReplyDeleteStefan Glienke thank you, that's the one, I think Roman Yankovsky can add that quite rapidly and make a sale (:
ReplyDeleteThat's why I always use a begin...end pair around even single statements.
ReplyDeleteNick Hodges happy man who does not maintain a 10-year old application that he has not written ;)
ReplyDeletePaul TOTH aka "the real world"
ReplyDeleteGreat! EMB learn from FixInsight
ReplyDeletehttp://sourceoddity.com/fixinsight/