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
consider adding support for fixing (single) file(s) to dart fix
#43892
Comments
(Failing support, the error message should be improved.) |
@pq do we plan on doing this any time soon? This issue should probably have an owner so it doesn't get lost. |
It's not planned yet. I'll self-assign to keep it alive. |
@pq any progress? I'm in the process of setting up git hooks for incremental codebase health improvement and am very surprised that |
Thanks for the ping @elektronik2k5 , I've been working mostly elsewhere and haven't dug into this one unfortunately. /fyi @devoncarew @bwilkerson: maybe this is something to consider when we slate some time for CLI feature work... @jwren : curious if this has any application internally (or if directories are the expected scope)? |
With regard git hooks, perhaps the generic rule would be something along the lines of: for each pubspec file, validate that there are no No one has requested this internally. |
If it becomes interesting to support fixing single files I expect that it won't be difficult. There might be some changes on the CLI side to accept a single file, and there might be some changes on the server side to accept a file, but by the time we go to build an |
Thanks a lot for looking into it, @pq, @jwren and @bwilkerson!
With some quick tinkering I got steps 1, 2 and 4 this shell one liner: dirname {staged_files} | uniq | xargs sh -c 'for directory; do dart fix --apply "$directory"; done' sh
Any chance of implementing something like this properly, as part of |
I just ran into this as well. The error message is pretty confusing, especially if you don't use |
Related to: #43886.
Currently:
I would expect this to work.
The text was updated successfully, but these errors were encountered: