dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.28k stars 1.58k forks source link

[analyzer] Missing/incorrect completion for analysis_options (in some cases) #57077

Open incendial opened 1 week ago

incendial commented 1 week ago

Hi, this is probably related to yaml parser, but still.

  1. When invoking the completion suggestions manually (in my case, option + esc), top level entries are suggested even when they are already in the config:

    Screenshot 2024-11-13 at 14 15 16

    To reproduce:

    analyzer:
    // <-- call the completion here
    exclude:
  2. Typing anything under the first entry (when there are other entries below it) does not trigger the completion at all
    analyzer:
    // <-- start typing here
    exclude:
    Screenshot 2024-11-13 at 14 17 03

Expected suggestions:

Screenshot 2024-11-13 at 14 17 20
incendial commented 1 week ago

@DanTup fyi

dart-github-bot commented 1 week ago

Summary: The Dart analyzer's code completion for analysis_options.yaml is inconsistent. It suggests top-level entries even when they exist, and fails to trigger completion when typing under existing entries.