Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple include(s) in analysis_options.yaml?

Tags:

flutter

dart

I'd like to combine two (or more) analysis_options.yaml files for my project but wasn't able to find a way how to do that.

This works:

include: package:pedantic/analysis_options.yaml

...

This works too:

include: package:flutter/analysis_options_user.yaml # note different "base" lint rules

...

But I'd need something like this:

include:
  - package:pedantic/analysis_options.yaml
  - package:flutter/analysis_options_user.yaml

...

...which results in following error:

warning: The include file - package:pedantic/analysis_options.yaml - package:flutter/analysis_options_user.yaml

in /home/.../analysis_options.yaml cannot be found. (include_file_not_found at [...] analysis_options.yaml:1)

Has anyone encountered/resolved same problem?

like image 462
Ikar Pohorský Avatar asked Aug 05 '19 14:08

Ikar Pohorský


1 Answers

You can only include one analysis options file.

Plus package:pedantic/analysis_options.yaml and package:flutter/analysis_options_user.yaml enforce different rules.

Example:

  • Pedantic does not use empty_statements
  • analysis_options_user.yaml uses it
like image 57
Nuts Avatar answered Nov 10 '22 00:11

Nuts