PolySync/cargo-culture

Only show output for failed rules

KodrAus opened this issue · 1 comments

This is just a suggestion based on a first impression. Please close this if you disagree!

As the number of rules increases, it might be more helpful to only list the ones that failed, or else list failed rules a second time at the end. This is a slightly different output than cargo test, but because rules are written as prose instead of Rust paths (like Should have a well-formed Cargo.toml file readable by cargo metadata instead of crate::path::to::tests::test_function_name) it could be trickier to visually separate the rules themselves in the output when there are a lot of them.

In this case, you're correct that the current strategy is in part motivated by keeping the output similar to cargo test.

Additional motivations include:

  • Helping first-time users who run cargo culture immediately see what all of the rules are.
  • Granting a sense of accomplishment / giving credit for following good practices by showing successes.

I think the red coloration of the FAILED marker is likely a sufficient first-pass helper for visual separation, and piping ala cargo culture | grep FAILED seems like relatively low-effort for non-hard-baked filtration.

Thank you for the feedback, and I'll continue to think on how to improve the interpretability of the output.