Zane Duffield
Zane Duffield
Continuing on the `label` gotcha: ```delphi procedure foo; var X: Integer; label Cursed; begin X := 0; goto Cursed; for X := 0 to 10 do begin Cursed: WriteLn; end;...
Hi! Thanks for taking the time to report. While it would be nice to detect cases like these, I don't think it's quite as simple as it seems. Here's (roughly)...
Given the rule already knows whether fields have been initialised (in unconditional cases), it could perhaps raise an issue on every function call on the uninitialised record? An implementation with...
> After thinking about it some more, there can be cases where certain algorithm may ignore the some of the first elements. It's definitely smelly to do that, but hard...
The following program demonstrates the basics of how it works. It runs to completion with no uncaught exceptions. ```delphi program CompilerSwitchContextExamples; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; function Echo(I: Integer):...
Hi @simonegirlanda, what version of Delphi are you using? I ask because in Delphi 11, your first example yields the compiler error > E2029 ')' expected but ':=' found ......
I should note that the `'a'` value isn't even compatible with the `array of Char` overload.
It seems to be related specifically to the open array parameter; if you replace `array of Char` with a type equivalent to `array[0..1] of Char` then sonar-delphi doesn't warn about...
Personally, I'm a fan of the way that PostgreSQL indicates that something is a comma-separated list. They append `[, ... ]` to whatever can be repeated in a list. An...
Which workflow should it link to?