microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
744 stars 245 forks source link

CodeCop should evaluate static Text to avoid overflow warning. #5820

Closed pri-kise closed 4 years ago

pri-kise commented 4 years ago

Describe the bug The CodeCop Rule (AL(AA0139)) should try to evaluate static text values, instead of showing a warning.

To Reproduce

For Example:

procedure GetQueueEntryKey(): Code[30]
begin
    exit(UPPERCASE('QueueEntryKey'));
end;

results in the following warning:

Possible overflow assigning 'Text' to 'Code[30]'.

Expected behavior The Code Cop should try to evaluate static text and Labels with Locked=true and only show a warning when a resolution isn't possible. Screenshots If applicable, add screenshots to help explain your problem.

5. Versions:

MarcHansenMicrosoft commented 4 years ago

Thanks We will have a look at it.

pri-kise commented 4 years ago

I'm really looking forward for this enhancement of the CodeCop :) Is there any ETA of this improvement?

MarcHansenMicrosoft commented 4 years ago

This has been fixed 2 month ago, I would expect that it is part of the docker for master.