avoid_abbreviations_in_doc_comments

SeverityQuick FixOptions
Warning

Details

DO avoid using abbreviations in doc comments as they can hinder readability and cause confusion for readers.

see: effective-dart

Included abbreviations:

  • e.g.
  • i.e.
  • etc.
  • et al.
Bad
/// This is documentation.
///
/// e.g. ...
int function(){}
Good
/// This is documentation.
///
/// For example ...
int function(){}

Usage

To enable the avoid_abbreviations_in_doc_comments rule, add avoid_abbreviations_in_doc_comments under custom_lint > rules in your analysis_options.yaml file:

custom_lint:
  rules:
    - avoid_abbreviations_in_doc_comments

Options

OptionTypeDescriptionDefault Value
abbreviationsList<String>The list of abbreviations to avoid.[]

To configure the list of abbreviations, add a list of strings to the abbreviations option:

custom_lint:
  rules:
    - avoid_abbreviations_in_doc_comments:
      abbreviations: ['approx.']