Add config dotfile and global dotfile
Needs to be there to allow setting up how scc should count things without needing to invoke arcane commands.
Possibly allow a global one as well? Something to consider. It should not need to be supplied, but instead just picked up by scc from where it runs to allow excluding of say vendor for some Go projects and such.
Possibly allow a global one as well?
I think a setting to support a feature like https://github.com/boyter/scc/issues/346 would definitely need to be global. In fact, something like https://github.com/boyter/scc/issues/346 should not be configured at the project level, since that would be too biased for most projects.
https://github.com/joho/godotenv use this rather than implement my own version seems sensible.
@spenserblack Yep. I would want both global and project support for this.
TODO is investigate how do actually get this working well, as dotfiles should always be overriden by command line params where supplied.
dotfiles should always be overriden by command line params where supplied.
One interesting thing I've seen in the Ruby ecosystem are "opts lists", that look like this:
--option foo
--flag
Basically, it's a space- and newline-separated list of arguments to pass to the argument parser. It's pretty simple and clever because the user doesn't have to learn the config file's format -- as long as they know the CLI, they basically know all they need.
Another thing: in the Rust ecosystem there's a package that wraps CLI, environment variables, and config all in one. Usage is vaguely like this (basically psuedocode)
let config = Config::new().filename("config.json");
let values = config.parse();
TBH I think such a package should exist in every language. I'd be interested in helping out to build such a package if there isn't already a candidate.
https://github.com/boyter/scc/issues/475 should be resolved by this