StefanMaron / BusinessCentral.LinterCop

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

LC0016 raised on extension fields where base field uses CaptionML #626

Closed ans-bar-bm closed 4 weeks ago

ans-bar-bm commented 1 month ago

I still have some extensions running on BC 14 (ugh) where all the BaseApp fields are still in C/AL with the CaptionML property. If I now add any BaseApp field to a page via PageExtension i get the LC0016 warning "Caption is missing.": image I would expect the warning to not show as a caption is set on the base table field - just with the old property syntax. I understand that adding the old CaptionML syntax to the "allowed" captions of the fields in my own app might not be wanted. In that case maybe there is an option to disable the warning for references to fields in other apps only (so only raise it on extended fields where the "owner" uses CaptionML)?

Arthurvdv commented 1 month ago

Thank you for raising this issue and also providing a PR for the solution.

This is now available in the (pre)release version of v0.30.21 of the LinterCop and will be included in the upcoming release.

Arthurvdv commented 1 month ago

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

ans-bar-bm commented 4 weeks ago

Did a quick test, worked for me. Thanks!