invalid_ option
Invalid option specified for '{0}': {1}
Description
#The analyzer produces this diagnostic when an option is specified and the value of the option is invalid.
Example
#
The following code produces this diagnostic because fail isn't a valid
severity for a diagnostic:
// %uri="analysis_options.yaml"
analyzer:
errors:
dead_code: fail
prefer_single_quotes: warning
Common fixes
#If you specify the option, provide a valid value for it:
// %uri="analysis_options.yaml"
analyzer:
errors:
dead_code: error
prefer_single_quotes: warning
If you don't need the option, remove it:
// %uri="analysis_options.yaml"
analyzer:
errors:
prefer_single_quotes: warning
Unless stated otherwise, the documentation on this site reflects Dart 3.10.3. Page last updated on 2025-12-5. View source or report an issue.