Check prefix for parameter
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.
Statistics in Results window
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
[W521] Now shown when using unitialized Result in right side of assignment
{code}
function DoSomething(const s: string): string;
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.
[C108] "Nested With ..." does not detect some cases
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.
Fatal parser error (Synapse Internet Library)
FixInsight break parsing on this unit from Synapse Library
False Positive warning to "O801"
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;
[W525] False positive with several constructors
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;
Suggestion [Wxxx] "Format parameters have wrong type"
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;
add an option to find all //FI comments that are no longer necessary
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.)
Customer support service by UserEcho