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 rule for missing Captions and OptionCaptions #4409

Closed AskeHolst closed 4 years ago

AskeHolst commented 5 years ago

Developers some times forgets adding captions (especially OptionCaption) and these mistakes are hard to catch in QA when testing is done in English as BC will fall back to using names when captions are not present.

I suggest adding four new CodeCop rules:

  1. "Field {0} should have a Caption." applies to table fields with no Caption.
  2. "Field {0} should have a OptionCaption." applies to table fields of type Option with no OptionCaption.
  3. "Field {0} should have a Caption." applies to page fields with no Caption when SourceExpr is not a table field.
  4. "Field {0} should have a OptionCaption." applies to page fields of type option with no OptionCaption when SourceExpr is not a table field..
atoader commented 5 years ago

Hi @AskeHolst ! Thank you for the suggestion. I will forward it to the team that owns the CodeCop analyzer.

fvet commented 5 years ago

@atoader

I'd like to add one related:

"ActionGroup {0} should have a Caption." applies to page ActionGroups (without subtype) with No Caption.

If no caption is available, the actiongroup doesn't render well in the webclient (no issue in the RTC)

MarcHansenMicrosoft commented 4 years ago

This is implemented in rules AS0221-AS0226

rdebath commented 4 years ago

This doesn't notice missing Action captions, it probably should.