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

LC0016 - ignores ShowCaption property

Open sit-zm opened this issue 11 months ago • 4 comments

LC0016 warning is shown even if ShowCaption = false for the group property on page.

image

Best, Zoran M.

sit-zm avatar Apr 02 '24 09:04 sit-zm

There's already an check in place for the ShowCaption property, so the rule shouldn't be raised.

I'm having trouble to reproduce this, because with the examples below the LC0016 diagnostic isn't raised.

Can you provide a small code sample to reproduce this bug?

page 50100 MyPage
{
    Caption = 'MyPage';

    layout
    {
        area(Content)
        {
            group(MyGroup)
            {
                ShowCaption = false;
            }
        }
    }
}

pageextension 50100 "Customer Card" extends "Customer Card"
{
    layout
    {
        addafter(General)
        {
            group(MyGroup)
            {
                ShowCaption = false;
            }

        }
    }
}

Arthurvdv avatar Apr 06 '24 08:04 Arthurvdv

Hi Arthur,

The sample is below. You can test it out.

pageextension 50000 DYCEMyExtension extends "Warehouse Shipment"
{
    layout
    {
        addlast(Shipping)
        {
            group("DYCEShippingTo")
            {
                Caption = 'Shipping To';

                field("DYCE Ship-To"; Rec."Assigned User ID")
                {
                    ApplicationArea = All;
                    Caption = 'Ship-to';
                    ToolTip = 'Specifies the address that the products on the sales document are shipped to. Default (Sell-to Address): The same as the customer''s sell-to address. Alternate Ship-to Address: One of the customer''s alternate ship-to addresses. Custom Address: Any ship-to address that you specify in the fields below.';
                }
                group(DYCEShipToFields)
                {
                    ShowCaption = false;
                }
            }
        }
    }
}

image

DYCE is mandatory prefix but that does not change the issue.

Best, Zoran M.

sit-zm avatar Apr 08 '24 08:04 sit-zm

I don't receive the warning LC0016 in my local deveopment environment (preview version), but I receive it in our pipelines e.g. for CueGroup

pri-kise avatar Apr 11 '24 18:04 pri-kise

I'm having trouble to reproduce this. A copy of your example doesn't thrown an warning for me 🤔

image

Can you very you have the latest LinterCop.dll (0.30.19.0) version?

%userprofile%.vscode\extensions\ms-dynamics-smb.al-13.0.1007491\bin\Analyzers

image

Arthurvdv avatar May 18 '24 15:05 Arthurvdv

Now it works OK.

I have the latest version BusinessCentral.LinterCop.dll image image image

sit-zm avatar May 20 '24 12:05 sit-zm