BusinessCentral.LinterCop icon indicating copy to clipboard operation
BusinessCentral.LinterCop copied to clipboard

LC0052 Wrong for Quotation Marks

Open pri-kise opened this issue 1 year ago • 2 comments

We created a procedure in a table extension with the following syntax where I receive the warning "The internal method PTE-XXX-IsDeletable in TableExtension PTE-XXX Job (Access = Public) is declared but never used."

    internal procedure "PTE-XXX-IsDeletable"(): Boolean
    begin        
        exit(true);
    end;

Maybe the procedure name isn't parsed correctly?

pri-kise avatar Jan 29 '24 07:01 pri-kise

internal procedure "PTE-XXX-IsDeletable"(): Boolean
internal procedure IsDeletable(): Boolean

I've looked into this and the Code Analyser can see the right naming of the procedures.

image

But when we grab the Name of the object, both of them become the same string.

image

At the moment I have no idea howto handle the quotes on this 🤔

Arthurvdv avatar Jan 31 '24 16:01 Arthurvdv

What do you think about a new rule: "procedure names should not contain quotation marks"?

Pazzakara avatar Mar 19 '24 08:03 Pazzakara

image I've found a solution for the Quotation Marks and the method and object now matches according their name.

What do you think about a new rule: "procedure names should not contain quotation marks"?

For me personally I'm not against having quotation marks in procedure names. Best to start a new discussion on this.

Arthurvdv avatar May 25 '24 11:05 Arthurvdv

This should now be resolved in the release version of v0.30.25 of the LinterCop.

Arthurvdv avatar Jun 10 '24 18:06 Arthurvdv