rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

No way to pass multiple values to list-like `--config` options

Open jaybosamiya opened this issue 1 year ago • 1 comments

There appears to be no way to pass multiple values to a configuration parameter such as skip_macro_invocations from the command-line:

$ rustfmt --config 'skip_macro_invocations=["foo","bar"]'
invalid key=val pair: `skip_macro_invocations=["foo"`

$ rustfmt '--config=skip_macro_invocations=["foo","bar"]'
invalid key=val pair: `skip_macro_invocations=["foo"`

I believe this is due to the immediate split of the argument done here: https://github.com/rust-lang/rustfmt/blob/21f353a6373126035f9063780bdccb9dd191a2bb/src/bin/main.rs#L572-L577

jaybosamiya avatar Feb 26 '24 22:02 jaybosamiya

Thanks for the report. Going to link to the tracking issue for skip_macro_invocations #5346

ytmimi avatar Mar 05 '24 01:03 ytmimi