Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dart format (and possibly analyze) should fail if it is unable to resolve include references in analysis_options.yaml #60291

Open
isoos opened this issue Mar 10, 2025 · 0 comments
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-analyze Issues related to the 'dart analyze' tool dart-cli-format Issues related to the 'dart format' tool

Comments

@isoos
Copy link

isoos commented Mar 10, 2025

SDK: 3.7.0

dart format reads analysis_options.yaml to get the formatter options (e.g. page_width). However, if the include reference inside that file is not available, it throws out the rest of the file too, ignoring the existing formatter options, using only the default values.

Originally found root cause here:
dart-lang/pana#1448

I think this silent fallback on failure is surprising, and I think dart format and possibly dart analyze should fail hard with clear error messages that some reference was not found.

@lrhn lrhn added area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-analyze Issues related to the 'dart analyze' tool dart-cli-format Issues related to the 'dart format' tool labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. dart-cli-analyze Issues related to the 'dart analyze' tool dart-cli-format Issues related to the 'dart format' tool
Projects
None yet
Development

No branches or pull requests

2 participants