taplo icon indicating copy to clipboard operation
taplo copied to clipboard

🐛 `taplo config default` don't print a default configuration

Open FirelightFlagboy opened this issue 2 years ago • 1 comments

Version

taplo 0.8.1

Steps to reproduce

# Install [email protected]
cargo binstall -y [email protected]
# Confirm taplo is installed
taplo --version
# Try to print the default configuration file
taplo config default

Actual result

Nothing is printed nor a file .taplo.toml is created

Expected result

The help command

taplo config default --help

Have the following summary:

Print the default .taplo.toml configuration file

I would expect the configuration to be printed to stdout or a file .taplo.toml to be created.

FirelightFlagboy avatar Aug 01 '23 07:08 FirelightFlagboy

Thanks for the bug report. Indeed it looks like taplo config default is currently a tautology. It will always print an empty file because that's the default configuration. I guess the intent would be the print the default values for the global options, but it's under an Option with another layer of Options for each option. Not sure of an easy fix, or if it even needs fixing. The default values are documented on the website: https://taplo.tamasfe.dev/configuration/formatter-options.html. I would instead suggest removing this command.

ia0 avatar Aug 08 '23 13:08 ia0