AL icon indicating copy to clipboard operation
AL copied to clipboard

AA0241Object Types should not be getting Warning

Open MatthewMcCarthy7 opened this issue 4 years ago • 15 comments

Please include the following with each issue:

1. Describe the bug When you sent AA0241 to warning or Error in a Codecop then it is giving a warning for object types. Based on https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/codecop-aa0241 Built in Methods should be Pascal Case

2. To Reproduce Set in the Ruleset to turn AA0241 to warning or error. Add an Object Type Variables and you will receive the warning.

image image

3. Expected behavior All Object Type Should not receive a warning, since they Should be Pascal case. TableData has the issue and CloseAction of what I could Find. Anything with Built-in methods and types are not included in this rule because they are written using Pascal case. In the Good Example, they have Label Capitalized.

4. Actual behavior Object Types are expected to be all Lowercase instead of Pascal Case

5. Versions:

  • AL Language: 10.0.671764
  • Visual Studio Code: 1.69.1

MatthewMcCarthy7 avatar Sep 07 '22 14:09 MatthewMcCarthy7

Thanks for reaching out. We’re focused on other things right now, but we’ve added this issue to our backlog. We’re planning to give the CodeCop engine and its rules an overhaul in a future major release. Thanks again!

thloke avatar Sep 29 '22 08:09 thloke

@thloke

What? Does this mean that the AL Extension will be broken in BC21 and that's just it?

I mean: this is not an edge case, this is a new bug, introduced in this version, that will affect every AL developer when the new AL extension is out of beta, as soon as they declare a variable...

And in case this is not clear: you don't really need to do anything in the CodeCop, that's just an extra.

By default, when you install the app, this is what you get for every Report, Codeunit, etc. variable:

CleanShot 2022-09-29 at 13 43 29

(This is with v10.0.683327 of the AL extension)

salgiza avatar Sep 29 '22 11:09 salgiza

By default, this rule should be hidden. I'll check with the team about why hidden code cop rules are showing up as info messages.

thloke avatar Sep 30 '22 01:09 thloke

We're re-evaluating this rule and will either fix it or (likely) remove it.

thloke avatar Sep 30 '22 06:09 thloke

Bump! @thloke

v10 released and this problem throws a lot of errors. Meanwhile the fastest solution I found is downgrading to v9.5

deadmouse avatar Oct 03 '22 12:10 deadmouse

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 22.0.47540.0 and VS Code Extension Version 11.0.691753.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

JesperSchulz avatar Oct 11 '22 06:10 JesperSchulz

@JesperSchulz Does this mean that the AL extension will keep showing wrong info messages until April, for those that don't have access to the insider builds?

Or does this mean that the rule will be disabled in a v10 update, and in v11 it will be fixed & reenabled?

salgiza avatar Oct 11 '22 07:10 salgiza

@JesperSchulz Does this mean that the AL extension will keep showing wrong info messages until April, for those that don't have access to the insider builds?

Or does this mean that the rule will be disabled in a v10 update, and in v11 it will be fixed & reenabled?

I can see, that a fix is released with 10.1.691752. @thloke, could you answer that one?

JesperSchulz avatar Oct 11 '22 08:10 JesperSchulz

Sorry for the silence on this, we've fixed the issue and will be backporting this to the marketplace version, so it should be fixed in the next marketplace release.

thloke avatar Oct 11 '22 09:10 thloke

Hello,

I have updated "AL Language" extension to v10.1.707468 and still getting the warning to these object types: Label, Page, Action, Enum, Codeunit

image image image image image

Ugniusig avatar Nov 11 '22 10:11 Ugniusig

Yup, I noticed Labels still suffer this, didn't notice/check the others though.

dzzzb avatar Nov 11 '22 10:11 dzzzb

Reopening.

thloke avatar Nov 14 '22 02:11 thloke

Any update to this?

DominicSaladin avatar Nov 30 '22 13:11 DominicSaladin

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 22.0.50526.0 and VS Code Extension Version 11.0.720957.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

JesperSchulz avatar Dec 09 '22 08:12 JesperSchulz

As the automated comment above says, we just merged more fixes to this rule. We'll be backporting this too so it should be in the next vsix release.

thloke avatar Dec 09 '22 08:12 thloke