Live data from Hacker News

The creeping scourge of tooling config files in project root directories

github.com

11–20 of 214 posts

Re: The creeping scourge of tooling config files in project root directories

#12

Also, please don't use dotfiles. There is no reason to hide such important files.

On which systems are they hidden? I hadn't even considered this issue because no file browser I've used in the last ~10 years has hidden dotfiles. Maybe Windows Explorer does, but that's a setting I typically change right away, so I don't even remember.

Re: The creeping scourge of tooling config files in project root directories

#13
In the screenshot in the article, 5 out of 8 are related to using JavaScript. Anecdotally, it does seem like more of a problem with Docker + JavaScript + Git in the same project.

I know some tools allow you to specify the location of your config files, and it would be nice if all tools started to do that.

Re: The creeping scourge of tooling config files in project root directories

#15

I 100% agree on this. But it's been pretty hilarious on how obstinate tool makers are about changing to Python's new pyproject.toml [1] Python packaging is a bit of a mess already, so when I recently started a new small package I wanted to choose tooling that would not clutter, but a fair amount of tool makers were reluctant to allow code into their repo that would use the unified toml rather than a ton of separate f…

Python is unified on a requirements.txt file with pip, to manage dependencies.

Re: The creeping scourge of tooling config files in project root directories

#18
post #5

It's probably too late to change every tool. If the main problem is that, when you go look at a project on github or gitlab, you see a long list of config files rather than the code you're looking for, a cleaner solution is for the git sites to show the listing for a /src directory instead of / on the project page.

Or hide/collapse dotfiles like the ls command does.

Putting them in .config is something to work toward in the long term, but I like this as an immediate fix. A possible UX could be a single entry at the bottom of the repo root listing with "+ 6 hidden files, click here to show", that then expands out to to reveal the full listing when clicked.

Edit to add— someone suggests this on the linked issue, and it is mentioned as a concern that auto-hiding the files could lead to them being used to conceal malicious code. Not sure how significant of a concern that really is, but it's an interesting angle, anyway.

Re: The creeping scourge of tooling config files in project root directories

#20
post #3

How conscientious. And yup, conventions like this work well Linux and BSD's. To note ~/.config for many configs These days you see this happening inside of .github/, where configs related to gh repos and actions go. If tooling authors started universally recognizing .config/ as a directory where we could keep stuff, the root could be super clean. How about just one file, across languages / CI tools / etc? a "project.…

One directory, maybe .config, seems like a good idea. One file is asking for trouble. All it takes is someone writing their first command-line app mixing up > and >> and suddenly the user's config for every tool they use is gone.
Post reply on HN