I think I found a bug! 🐛
(just a small one)
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 options
if !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.
I think I found a bug! 🐛
(just a small one)
When invoking StyLua with the
summaryoutput format and without thecheckflag, 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
standardand the error message is missingsummaryor the check should be checkingstandardinstead 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.