Skip to content

analysis_options.yaml "include:" not working for nested folders unless workspace root has a package config for the referenced package #56047

@davidmorgan

Description

@davidmorgan

I have an analysis_options.yaml using include:

include: package:dart_flutter_team_lints/analysis_options.yaml

And it looks correct because if I "dart analyze" I get findings:

   info • lib/generate_dart_model.dart:141:15 • Method invocation or property access on a 'dynamic' target. Try giving the target a type. • avoid_dynamic_calls

But I don't see any such info in VSCode. If I copy the config in place:

analyzer:
  language:
    strict-casts: true
    strict-inference: true

linter:
  rules:
    avoid_dynamic_calls

then I immediately see the finding in VSCode.

Any ideas please? I ran into this on the language repo and ended up giving up and just copying the whole config in

https://github.com/dart-lang/language/blob/main/working/macros/dart_model/analysis_options.yaml

and now I run into it again in the macros repo

https://github.com/dart-lang/macros/tree/main/pkgs/dart_model

with my pending PR that has some lint issues :)

@jakemac53 @devoncarew @DanTup any ideas please? :)

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failureslegacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions