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.

0

unicodestring

Roland Bengtsson 5 years ago 0

Methods like this with Unicodestring

procedure test(s: UnicodeString);

Should have

O801 CONST missing for unmodified string parameter 's'

0

C109 Unneeded boolean comparison

shahram_banazadeh 6 years ago 0

I have downloaded Trial Version of fixinsight.But there are too many false positive warnings.
for example

 if not( IdTelnet1.Connected ) then
  begin
    Timer1Lan.Enabled := false;
    Timerc.Enabled := True;
    exit;
  end;
or

   b := sepdate(logstr, 22, 8, log.month, log.Day, log.Year);
          if b = false then
          begin
            ok := false;
            exit;
          end;
         ....

both:C109 Unneeded boolean comparison

Or
O801 CONST missing for unmodified string parameter 'S' for function define
function SepTime(S: string; Var hour, minute: word): boolean;

am I do something wrong?
0

Warning for unneeded FixInsight ignores

Tommi Prami 7 years ago 0

IF some //FI:CODE will become obsolete by the changes into the file, there shoudl be warnign that there is Ignore rule added, but it is not needed anymore.

0
Planned

Add an option to "ignore comments" to rule c101

Lübbe Onken 9 years ago updated 8 years ago 2
Some routines may contain a lot of comments, sometimes even more than the code. This option would allow to only count "the real code" towards the number of lines.
0
Planned

specify units to processing

Vitaliy L. 9 years ago updated by Roman 8 years ago 6
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
Planned

Better handling of invalid .ficfg files

Lübbe Onken 8 years ago updated by Roman 8 years ago 1

Today I upgraded our test system to FI 2016.9. When I copied settings from DefaultSettings.ficfg into our config, I accidentally added two closing xml tags.


This invalid ficfg file caused a crash of FixInsight with an access violation in FixInsight.Services.dll. It was easy enough to solve, but a proper error message like "the configuration file '%s' is not a valid xml file" would be helpful.


0
Fixed

[W504] not detected when class is declared in the implementation part

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

There's a bug with the W504 detection in FixInsight 2016.04, when the class is declared in the implementation part of a unit.

In the following code, there should be a W504 and a W525 detected, but only the 504 is shown and it is shown in the wrong location.


unit W504Test;

interface

uses
  System.Classes;

// Declare class in implementation, only the 504 warning is thrown in destructor
// nothing is shown for constructor
implementation 

type
  TBinWriter = class
  end;

  TContentBuilder = class(TStringList)
  private
    FBinWriter: TBinWriter;
  public
    constructor Create(ABinWriter: TBinWriter);
    destructor Destroy; override;
  end;

// Declare class in interface, behaviour is correct
// implementation 

constructor TContentBuilder.Create(ABinWriter: TBinWriter);
begin
//  inherited Create;
  FBinWriter := ABinWriter;
end;

destructor TContentBuilder.Destroy;
begin
  FBinWriter := Nil;
//  inherited;
end;

end.

This FixInsight bug bit me really hard until I spotted the missing "inherited create" bug in my code...

0
Fixed

Fatal parser error

Kai Frentzel 8 years ago updated by Roman 8 years ago 3

With the current code, i got a fatal parser error:

unit Artikelmanager.OrmKonstanten;
interface
type
  TOrmFeldInfo = record
    Name: string;
    Laenge: Integer;
  end;
  KORMInfoDruckvorlage = class(TObject)
  public const
    Name: TOrmFeldInfo = (Name: string; Laenge: Integer);
  end;
  implementation
end.

0

Occurred O801 warning at the method of property getter.

JungHwan Jang 8 years ago updated 8 years ago 0

Hello This is JH Jang from Korea.

Thank you for great tools.


Actually, I wasn't care it before using the FixInsight. I work with Windows 10 and Berlin 10.1.


If the property has a index(e.g. property foo[Index: Integer]: String read GetFoo, property bar[Idx: Integer]: Integer index 1 read GetBar ...), the get method's parameter cannot declared with const type in a every case.


I hope to filtering it.

Best regard.