-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 analyze --options
does not exist (did with dartanalyzer
)
#56228
Comments
Summary: The |
It was intentionally removed as part of moving to using the analysis server (which was done so that we had less code to maintain). It doesn't make sense from an IDE perspective to be able to specify a different file at the point where you're starting up the server, so the capability wasn't available without extra effort, and there was no use case to argue for doing the work to preserve it. If there's a valid use case for this functionality then we can put it on the list of features to add. |
Fair. This came up as a result of chatting with @pq a bit, where we were talking about "an analysis options set that isn't run on CI as a breaking, but we would like to be able to review periodically". As a concrete example, being able to add lint "deprecated_member_use" diagnostics that are normally ignored. The workaround of course is just use the file system or manually patch files (I can't recommend that last one). |
I haven't thought about it much but another approach might be to add support that parallels the
|
Ah that's interesting. I had seen at least one suggestion for something like: dart fix --ignore-codes=<code1,code2,...> You could imagine using that as an "auto fix" for existing deprecations. |
My use case is that I want to use However, there is a limitation of using one 'dart analyzer' plugin at a time. I can either use
or
So I have created:
I would like there to be support for This is so I can use a default plugin for my IDE (dart_code_linter) but then I can manually query the rules I'm violating under a different plugin (riverpod_lint/custom_lint) and I accept that I will be reading terminal output instead of the VSCode problems tab. Thanks for any support into adding this functionality :) |
Thanks for the use case. We are currently investigating to see whether we can drop the one plugin limitation. If we're successful, then we shouldn't need this added support in order to satisfy your use case. @srawlins On the other hand, the Part files with imports proposal might make it necessary for us to have some similar configuration information in the analysis options file, which might in turn provide a similar use case for this functionality. |
How can I run
dart analyze
(or variants there-of) with a customanalysis_options.yaml
file?https://dart.dev/tools/dart-analyze does not mention anything, but the source code suggests
--options
.I suspect this was lost in the
dartanalyzer
->dart analyze
migration.The text was updated successfully, but these errors were encountered: