Enter forum description here ...
+4

Check prefix for parameter

Kai Frentzel 8 years ago updated by Marcus Mangelsdorf 4 years ago 1

Check if the paramter of a method have a prefix:

var Parameter: v

out Parameter: o

other Parameter: a


So you can see what type of parameter is used.

+3

Statistics in Results window

il2 8 years ago 0

Would be useful to show header line with start time/FI version and footer line with end time, check duration, number of files, number of issues found, average speed scan in Results window.

For example:

[Info] 2016-03-29 01:01:01 FixInsight 2016.03 started

....

[Info] 2016-03-29 01:01:45 FixInsight 2016.03 found 10C/12W/15O issues, 44 sec, 1000 files, 50 KB/sec

or

[Info] 2016-03-29 01:01:45 FixInsight 2016.03 no issues found, 44 sec, 1000 files, 50 KB/sec

+3

[W521] Now shown when using unitialized Result in right side of assignment

Anonymous 9 years ago 0
This code does not trigger the warning:

{code}
function DoSomething(const s: string): string;
begin
if StartsStr('\', s) then
Result := Copy(Result, 1);
end;
{code}

Yes, the code snippet does not make any sense and the real code is a bit more complex but the fact that the right side of the assignment contains Result is causing the warning to not be shown.
+2

[C108] "Nested With ..." does not detect some cases

Lübbe Onken 8 years ago updated 8 years ago 2

As I was playing around with C108, I came across the following code snippet, where FixInsight 2015.11upd2 does not detect the nested with statements.


program Project4;
{$APPTYPE CONSOLE}
{$R *.res}
type
  TA = class
    NA: string;
  end;
  TB = class
    NB: String;
  end;

var
  A: TA;
  B: TB;
begin
  A := TA.Create;
  B := TB.Create;

  with A, B do <-- would expect a C108 warning here. I consider this a "nested with" too
    WriteLn(NA, NB); 

  with A do
    with B do <-- would expect a C108 warning here
      WriteLn(NA, NB);

end.

Maybe it's fixed in a later version, but upd6 throws some false positives, which is why I won't roll it out in our company yet.

+2

Fatal parser error (Synapse Internet Library)

Anonymous 9 years ago 0
[FixInsight Internal] synsock.pas(85): Fatal parser error

FixInsight break parsing on this unit from Synapse Library
+2

False Positive warning to "O801"

Balázs Szakály 9 years ago updated by Lübbe Onken 8 years ago 1

procedure ProcB(var AText: string);

begin

AText := AText + AText;

end;


procedure ProcA(A: string); <-- False positive warning. Cannot declare const, because i pass to ProcB as var param!

begin

ProcB(A); <- var parameter!!!

...

...

end;

+1

warn about unused function

Anonymous 8 years ago 0
+1

[W525] False positive with several constructors

Anton Shchyrov 8 years ago 0
TTest = class
  constructor Create;
  constructor Create2;
end;

constructor TTest.Create;
begin
  inherited Create;
end;

constructor TTest.Create2;  // W525 Missing INHERITED call in constructor 
begin
  Create;
end;
+1

Suggestion [Wxxx] "Format parameters have wrong type"

Lübbe Onken 8 years ago 0

As followup to: http://fixinsight.userecho.com/topics/132-w513-false-positives-with-numbered-parameters/


Would it be possible for you to check the parameter types for compatibility? Because errors there will crash the applicaton at runtime. Taking into account numbered parameters of course :)


Something like:

var
  iError: integer;
  sError: string;
begin
  Format('Code %s [%d]', [sError, iError]);
  Format('Code %d [%d]', [iError, sError]); <-- Wxxx Parameter data type doesn't match placeholder
  Format('Code %s [%0:d]', [sError, iError]); <-- Wxxx Parameter data type doesn't match placeholder
end;
+1

add an option to find all //FI comments that are no longer necessary

dummzeuch 8 years ago 0

Since every new version of FixInsight fixes some false positives which we previously had to disabled using a //FI:<warning-code>, these comments now become obsolete and clutter the code. Please either add an option or maybe even always add a message about such unnecessary comments.

(I think an option would be better, sometimes I only want to see new warnings, and don't care about obsolete //FI comments.)