AL icon indicating copy to clipboard operation
AL copied to clipboard

CodeCop rule for missing Captions and OptionCaptions

Open AskeHolst opened this issue 7 years ago • 4 comments

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..

AskeHolst avatar Dec 28 '18 16:12 AskeHolst

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

atoader avatar Jan 01 '19 09:01 atoader

@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)

fvet avatar Jan 22 '19 07:01 fvet

This is implemented in rules AS0221-AS0226

MarcHansenMicrosoft avatar Jan 20 '20 13:01 MarcHansenMicrosoft

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

rdebath avatar May 16 '20 11:05 rdebath