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
733 stars 243 forks source link

AL: Warnings can't be removed #7538

Closed txeriff closed 6 months ago

txeriff commented 11 months ago

Issue: After AL has been upgraded to version 12 I get few warnings (from old developments before me): The identifier '"Item No. "' cannot have any leading or trailing spaces. This warning will become an error when targeting a runtime with version '13.0' or higher.

To Reproduce

-Update to AL version 12 -Add a field with some leading or ending blank space. -If you try to add in app.json "suppressWarnings": ["AL0771"] it will just fail because:

'suppressWarnings' is not available in runtime version '2.2'. The supported runtime versions are: '6.0' or greater.

-I can't switch to version 6.0 because I'm in BC13 (2.0) -I can't supress the warnings then. Before these warnings weren't an issue.

Thanks.

pri-kise commented 11 months ago

Shouldn't you be able to use the ruleset.json to ignore a warning? https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-rule-set-syntax-for-code-analysis-tools

txeriff commented 11 months ago

Shouldn't you be able to use the ruleset.json to ignore a warning? https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-rule-set-syntax-for-code-analysis-tools

Thanks. But this wasn't happening before.

BazookaMusic commented 11 months ago

Are you sure the runtime version was not left unspecified before? From what I can see, the 'suppressWarnings' manifest property does have compatibility set to 6.0 since many years, so version 2.2 is not supported officially.

Unfortunately, even if it was working before, it was due to a bug. We cannot remove the compatibility for this property. I would also suggest to add a ruleset for the purpose of silencing warnings, since that is not versioned based on the runtime version.

SBalslev commented 6 months ago

No followup since October 23, please reopen if needed.