proper_super_init_state

SeverityQuick FixOptions
Error

Details

DO call super.initState() at the start of the initState method.

Bad
@override
void initState() {
  _init();
  super.initState();
}
Good
@override
void initState() {
  super.initState();
  _init();
}

Usage

To enable the proper_super_init_state rule, add proper_super_init_state under plugins > pyramid_lint > diagnostics in your analysis_options.yaml file:

plugins:
  pyramid_lint: <version>
    diagnostics:
      proper_super_init_state: true