StefanMaron / BusinessCentral.LinterCop

Community driven code linter for AL (MS Dynamics 365 Business Central)
https://stefanmaron.com
MIT License
77 stars 31 forks source link

LC0052 Wrong for Quotation Marks #522

Closed pri-kise closed 3 months ago

pri-kise commented 8 months ago

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?

Arthurvdv commented 8 months ago
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 🤔

Pazzakara commented 7 months ago

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

Arthurvdv commented 4 months ago

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 commented 4 months ago

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