-
- Notifications
You must be signed in to change notification settings - Fork 746
Display task summary #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display task summary #180
Conversation
Usage: There are still some questions to me:
What should happen, if there are given multiple tasks? |
Wouldn't it be cooler to have kind of inspect/describe command, which shows long description and the whole command specification? |
I think there is a difference. Sometimes it makes sense, if you have preconditions or something like that, to document it. I think for that a |
I meant this in addition to your newly introduced keyword, it's pretty cool to give tasks a more detailed description. But the details context could print also the whole task in detail. |
Could you propose a sample output for this? |
I don't know maybe something like this ?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jaedle, great work with the code, tests and documentation! 👏 👏👏
Thanks for spending the time on work on this. I did just a few comments, but once addresses this is good to go.
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
Co-Authored-By: jaedle <32975714+jaedle@users.noreply.github.com>
Hey @andreynering, thanks for the review. I‘m quite new to golang, so I really appreciate it! Fixes are comming next week 😊 |
task.go Outdated
} | ||
| ||
if e.Summary { | ||
summary.PrintAll(e.Logger, e.Taskfile, calls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been thinking hard how to do this.
I think the task component (high level abstraction, only delegates to other components) should not care about a low level detail like spacing for the output of the summary.
To fix this, I added a PrintTasks
Method for the summary
-package, which deals with it and is unit-tested.
I really hope this is good to go! :) |
@jaedle Thanks again! If I can give you a friendly tip, next time try keeping a smaller number of commits. |
Thanks for the recommandation. I usally tend to squash merge, if you don‘t, I will squash the branch before raising the PR. |
Adding a
--summary
flag for task to get more a summary of the taskSee #107
New field in task called
summary
Output for
task --summary release
:Behaviour:
--summary
will not execute the task--summary
will display the summary of a task (see above)--summary
will use description as fallback, if summary does not exist--summary
will output a warning (or information), if no description/summary is present--summary
will output the dependencies if there are any--summary
will output the commands if there are anyTests:
task_test.go
Documentation is present for that feature