Enter forum description here ...
No similar topics found.

0
Under review
W508 False positive when assigning to a property
Assigning to a property might have side effects that make it necessary to make two successive assignment, e.g.:
procedure RestartTimer;
begin
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
Difficult to determine whether this is a problem or not.
Maybe we could have a special comment like this:
// FixInsight:NoW512: duplicate assignment necessary
// ^- this part for FixInsight ^- This part for the developer
to get rid of these warnings once we have checked them?
So, this would no longer raise this warning:
procedure RestartTimer;
begin
// FixInsight:NoW512: duplicate assignment necessary
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
procedure RestartTimer;
begin
FTimer.Enabled := False;
FTimer.Enabled := True;
end;
Difficult to determine whether this is a problem or not.
Maybe we could have a special comment like this:
// FixInsight:NoW512: duplicate assignment necessary
// ^- this part for FixInsight ^- This part for the developer
to get rid of these warnings once we have checked them?
So, this would no longer raise this warning:
procedure RestartTimer;
begin
// FixInsight:NoW512: duplicate assignment necessary
FTimer.Enabled := False;
FTimer.Enabled := True;
end;

0
Fixed
[W521] False positive when the name of the function is used instead of Result
Function MyFunc:String;
Begin
MyFunc:='dummy';
End;
Begin
MyFunc:='dummy';
End;

0
Fixed
[W521] False positive when using "with Result"
I have a few functions where the result type is a record.
In some of these functions, the following construct is used:
with Result do
begin
Field1 := '';
Field2 := 0;
end;
In this case, Result is indeed assigned to.
In some of these functions, the following construct is used:
with Result do
begin
Field1 := '';
Field2 := 0;
end;
In this case, Result is indeed assigned to.

0
Completed
[Settings Dialog] Add a popupmenu with "Disable All" and "Enabled All"
Enabling for example only the W513 warning requires me to disable a lot other warnings and I guess the amount grows over time. A popupmenu with something like "Disable All" and "Enabled All" would be very helpful.

0
Ignore (all) warnings a block of code
It would be nice to be able to ignore a block of code rather than only a single line for a particular or even all warnings. Something like this:
//FI:all off - turn off all warnings
some code here
//FI:all on - turn on warnings again
or
// FI:W508 off - ignore empty procedures
lots of empty procedures here
// FI:W508 on - warn about empty procedures again
//FI:all off - turn off all warnings
some code here
//FI:all on - turn on warnings again
or
// FI:W508 off - ignore empty procedures
lots of empty procedures here
// FI:W508 on - warn about empty procedures again

0
Planned
specify units to processing
Sometimes projects include third-part units that have some issues. Developer may not want to edit these files, but FixInsight process them and show warnings though. How about a setting to exclude units and/or even paths from processing? Or to include only part of project into processing.

0
Boolean AND and OR operators precedence check
Probably most frequent error:
(a = 1 OR b = 2) AND c = 3 OR d = 4
In general:
(*lower precedence op*) *higher precedence* *lower precedence op*
or without parentheses:
*lower precedence op* *higher precedence* *lower precedence op*
(a = 1 OR b = 2) AND c = 3 OR d = 4
In general:
(*lower precedence op*) *higher precedence* *lower precedence op*
or without parentheses:
*lower precedence op* *higher precedence* *lower precedence op*

0
Hint on unnecessary begin/end block
Found in RTL:
for I := 0 to TypeData^.PropCount-1 do
begin
begin
if (Props^[I]^.PropType^^.Kind = tkClass) and
(GetOrdProp(Owner, Props^[I]) = IntPtr(Self)) then
FPropName := System.TypInfo.GetPropName(Props^[I]);
end;
end;
It has an unnecessary begin/end block

0
Fixed
[W508] False positive with method adding a new item to a list
Methods that add for example items to a list may lead to a false positive W508 warning
Sample code:
type
TItem = class(TObject)
Prop: Boolean;
end;
TItemList = class(TObject)
public
function Add: TItem;
end;
function TItemList.Add: TItem;
begin
{
FItems.Add(TItem.Create);
Result := FItems.Last;
}
end;
procedure Test;
var
List: TItemList;
begin
List.Add.Prop := False;
List.Add.Prop := False;//<- W508 Variable is assigned twice successively
end;
Also when Add has a parameter (e.g. AName) and both Add calls have the same value then W508 occurs.
Sample code:
type
TItem = class(TObject)
Prop: Boolean;
end;
TItemList = class(TObject)
public
function Add: TItem;
end;
function TItemList.Add: TItem;
begin
{
FItems.Add(TItem.Create);
Result := FItems.Last;
}
end;
procedure Test;
var
List: TItemList;
begin
List.Add.Prop := False;
List.Add.Prop := False;//<- W508 Variable is assigned twice successively
end;
Also when Add has a parameter (e.g. AName) and both Add calls have the same value then W508 occurs.

0
Fixed
Resizing the dialog doesn't move the Run / cancel buttons
If you resize the 'Run FixInsight' dialog (the one that shows all the possible messages, lets you check / uncheck them, etc) then the button stay in the same position. They should be anchored to the bottom right or similar.
Customer support service by UserEcho