dprint / dprint

Pluggable and configurable code formatting platform written in Rust.

Home Page:https://dprint.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Config update traverses dir hierarchy downwards

scop opened this issue · comments

Not sure if this is a bug or intended behavior, but it appears dprint config update traverses the directory hierarchy downwards from the dir where it is invoked in. I find this surprising, I thought it'd just check if there are updates available for plugins that are included in the config, no tree traversal would be needed for that? I'm guessing it could be looking up what kind of files are present like it does for dprint init, but if it's that, I'm wondering why?

This can cause a significant delay when invoked in a dir that has lots of dirs and files in it. In my case, I'm using a ~/.dprint.jsonc in my home dir to serve as a "global config", and invoking dprint config update there takes quite a bit of time -- I haven't waited for it to actually finish. My workaround is to create an empty dir in my home dir, cd to that, and run the config update there.