Ruby CLI: Improve and flesh out herb analyze command#1259
Merged
Conversation
5e2f643 to
0316f17
Compare
0316f17 to
1e9757e
Compare
commit: |
🌿 Interactive Playground and Documentation PreviewA preview deployment has been built for this pull request. Try out the changes live in the interactive playground: 🌱 Grown from commit ✅ Preview deployment has been cleaned up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request reworks, improves and fleshes out the
herb analyzein the Ruby CLI.We removed the interactive mode in favor of simpler
.to print progress. The interactive mode in its previous state was kind of broken and glitchy when the list of failed files didn't fit on a single screen height.Instead of generating the analyze log file, we no show richer, and more relevant errors right in the output of the
analyzecommand, that should make it easier to see the state of a project. Additionally, we visually updated the output to match the output of theherb-lintCLI more closely.We also added a new
reportsubcommand that you can use to generate a copy-able markdown report that can be used to report issues about Herb on GitHub.More importantly, we restructured the way the analyze command works by trying the more closely group the failed files so it's easier to follow why something is failing and at which stage. Since we also have multiple parser and engine options, we try to fallback to less-strict options to see if that makes some of the errors go away.
The
analyzesubcommand also doesn't need an argument now, it automatically assumes.(current directory). It now also accepts single files, not just paths to directories.Resolves #507
Resolves #941