dot-config.github.io icon indicating copy to clipboard operation
dot-config.github.io copied to clipboard

Clarify what to do in case of conflict

Open plexus opened this issue 1 year ago • 1 comments

I'm very happy to see this initiative, as a tool author I was looking to see if something like this existed. I'm happy it does, and I'll be adopting this for starters in Kaocha, a test runner for Clojure.

One thing that I think would be worth stating explicitly is how tools should behave if a config file exists both at the top level of the project and in . config

Reasonable options

  • show an error message and exit
  • top level takes precedence (with warning?)
  • .config takes precedence (with warning?)
  • they are merged (in a specified order), if that makes sense for the tool

plexus avatar Feb 16 '24 12:02 plexus

I was just thinking about this myself (for RuboCop) and there it made most sense to have the top-level take precedence (just because you can have it's configuration at every level of a directory structure), but for most cases I think it'd be best to go with option 1 as the safest one.

bbatsov avatar Feb 16 '24 18:02 bbatsov