Enter forum description here ...
+5
Completed

W511: false positives (Object 'xxx' created in try block

dummzeuch 9 years ago updated by Roman 9 years ago 3
The warning W511: Object 'xxx' created in try block is annoying because it is common practice to write code like this:

bla := nil;
blub := TBlub.Create
try
bla := TBla.Create;
// ...
finally
bla.Free;
blub.Free;
end;

I realize that is is difficult to determine whether the object variable is being initialized with nil (how far in front of the try do we look?) but we need a way to reduce the amount of such warnings otherwise they will just be turned off.

(I am sure I am not the first one to notice this, but I the look up did not find anything.)
+4
Answered

Command Line Client: Define rules per Parameter

Anonymous 9 years ago updated by Roman 9 years ago 6
FixInsightCL -- project=\source\example.dpr --rules=W507;508;C105;C106
+4
Fixed

[W513] False positive when using index specifier

Uwe Schuster 9 years ago updated by Roman 9 years ago 3
Using an index specifier in format statements creates false positive W513 warnings.

ShowMessage(Format('%d %0:d', [1]));//OKAY - output "1 1"
ShowMessage(Format('%0:d %0:d', [1]));//OKAY - output "1 1"
ShowMessage(Format('%0:d %0:d %1:d', [1, 2]));//OKAY - output "1 1 2"
ShowMessage(Format('%0:d %0:d %1:d %d', [1, 2]));//ACTUALLY AN ERROR, because last %d requires a third arguments array item
+2
Completed

Add Conmment "directive" so can suppress FixInsignt false positivie (if needed)

Anonymous 9 years ago updated by Roman 9 years ago 3
Like this kind of
try
LMyObject := DoSomethingWhichSometimesRaiseExcptionWhichICantDoNothingOrByDesign;
except
{ Eat this exception because of this and that FixInSigntSuppressWarnings(W501) }
end;

Would be cleaner the use Comments IMHO than some compiler directive way present now (I think)
+2
Completed

Show the name of the class and field in C107 "Class field name should start with 'F'

Anonymous 9 years ago updated by Roman 9 years ago 2
It would be helpful, if the C107 message "Class field name should start with 'F'" contained the class name and field name e.g. "Class field name 'TMyClass.SomeField' should start with 'F'"
+2
Completed

Split rule W504 Missing INHERITED call in constructor/destructor

Maik Görtz 9 years ago updated by Roman 9 years ago 2
We are using FixInsight in our build chain. Not calling inherited in destructor should be an exception. But not calling inherited in constructor should be a warning. To interprete so from build server it has to be two seperate rules.
Answer
Roman 9 years ago
Agree, that's good point. This will be implemented in the next update
+2
Completed

New warning: uninitialised managed results in methods

Anonymous 9 years ago updated by Roman 9 years ago 3
The Delphi compiler warns you if a function may not have had its Result initialised, if it is a simple / unmanaged type (eg an integer.) However, it doesn't do this if it is a managed type, like an interface or string. IMO it should - not initialising a result is a problem - and it'd be great if this warning could be implemented in FixInsight.
+2
Completed

Add a warning 'inherited call missing in constructor'

Anonymous 9 years ago updated by Roman 9 years ago 2
This would be similar to the existing warning for destructors. If a constructor doesn't call an inherited constructor, it should warn.
+2
Thanks

thanks for the update,,,, awesome product!

Anonymous 9 years ago updated by Roman 9 years ago 1
awesome product!
Answer
Roman 9 years ago
Thank you :)
+1
Fixed

[W528] False positive when using for.. in

Lübbe Onken 9 years ago updated by Roman 8 years ago 3

The following section of code results in a false positive W528 "Variable 'StopChar' not used in FOR-loop". This is not a complete and tried example, just an extract from the routine.

FixInsight 2015.10.


TempIndex := NewLineIndex;
for StopChar in StopChars do
    if Self.FBufferedData[TempIndex] <> StopChar then
        Break
    else
        Inc(TempIndex);