You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When invoking StyLua with the summary output format and without the check flag, e.g.
stylua --output-format=summary file.lua
I get an error:
error: --output-format=unified and --output-format=standard can only be used when --check is enabled
which, as you might have noticed, doesn't mention summary. So, I had a look at the code to see if I was missing something, and found this:
// Check for incompatible optionsif !opt.check
&& matches!(
opt.output_format,
opt::OutputFormat::Unified | opt::OutputFormat::Summary){bail!("--output-format=unified and --output-format=standard can only be used when --check is enabled");}
So it looks like either the check is missing standard and the error message is missing summary or the check should be checking standard instead of summary. But I don't know Rust, and I'm not sure what the expected behaviour should be - so I'm not sure how/what the fix would be.
The text was updated successfully, but these errors were encountered:
Took me a while to figure out what the behaviour should be 😅, but looks like my intention was that --output-format=summary can only be used when --check is enabled (5840654).
So, I think the check is correct, but the error message is wrong. The error message should say --output-format=summary.
Ah that makes perfect sense - thanks for clarifying! Now that you mention it, having to use --check with the default output format (i.e. standard) doesn't seem quite right.
Anyway, I've made the PR (#949) if you want it and thank you for the quick response and for maintaining this awesome project! 🙂
I think I found a bug! 🐛
(just a small one)
When invoking StyLua with the
summary
output format and without thecheck
flag, e.g.I get an error:
which, as you might have noticed, doesn't mention
summary
. So, I had a look at the code to see if I was missing something, and found this:So it looks like either the check is missing
standard
and the error message is missingsummary
or the check should be checkingstandard
instead ofsummary
. But I don't know Rust, and I'm not sure what the expected behaviour should be - so I'm not sure how/what the fix would be.The text was updated successfully, but these errors were encountered: