avoid_mutable_global_variables

SeverityQuick FixOptions
Warning

Details

DO avoid using mutable global variables.

Bad
double pi = 3.14;
Good
const double pi = 3.14;
const pi = 3.14;

Usage

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

custom_lint:
  rules:
    - avoid_mutable_global_variables