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
723 stars 241 forks source link

CodeCop Rule AA00231 Do not use the StrSubstNo or string concatenation as a parameter in the Error method.AL(AA0231) #5786

Closed kristianeWiise closed 4 years ago

kristianeWiise commented 4 years ago

Describe the bug We recently updated the AL Language extension to the latest version ( 5.0.254.558 ) and encountered a warnings related to AA00231 rule set.

Just wanted to ask if we put this as part of the Ruleset will this be deprecated in the future development?

Otherwise if we need to refactor the codes and put it to a Variable. Is this the intended way to fix the warnings?

image

Any feedback is very much appreciated :)

Thank you in Advance

Screenshots

image

5. Versions:

NKarolak commented 4 years ago

You should find all information about it here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/codecop-aa0231-donotusestrsubstnoinerrormessage

MarcHansenMicrosoft commented 4 years ago

@NKarolak is spot on.

You should write Error('%1 %2', Text145041_Lbl, Text145045_Lbl);