invalid_ section_ format
Invalid format for the '{0}' section.
Description
#The analyzer produces this diagnostic when an analysis options file contains a configuration section (key) whose content is not in the expected data structure or format. For example, this occurs when the configuration requires a map but is provided a list.
Example
#
The following code produces this diagnostic because the errors section
expects to have a map as its value:
// %uri="analysis_options.yaml"
analyzer:
errors:
- dead_code
Common fixes
#Change the value to be of the appropriate format:
// %uri="analysis_options.yaml"
analyzer:
errors:
dead_code: error
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.