Skip to content
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

Use "--short" by default, convert it to "--long" #5

Open
AlexandreDecan opened this issue Nov 14, 2023 · 2 comments
Open

Use "--short" by default, convert it to "--long" #5

AlexandreDecan opened this issue Nov 14, 2023 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@AlexandreDecan
Copy link
Collaborator

Hello,

Currently, when reporting on a change through the CLI, values are provided in their "long" version. We have an option to make the output shorter, by specifying --short (or -s). I propose that, by default, we truncate the output (i.e., we apply the behaviour of --short) while providing a new option, namely --long or --full-value or..., to indicate that the output shouldn't be truncated. The rationale behind this suggested change is that I expect users to be more interested about the kind of changes that were made to the file (and the path of those changes) rather than the values (since, if you know the path, you can easily find the full values in the respective files).

@AlexandreDecan AlexandreDecan added enhancement New feature or request question Further information is requested labels Nov 14, 2023
@tommens
Copy link
Collaborator

tommens commented Nov 15, 2023

It is difficult to assess whether your expectation of "users to be more interested about the kind of changes that were made to the file rather than the values" is actually correct or not. This is very difficult to know given that we do not have any users of the tool yet, as the tool is not officially announced yet anywhere. Hence, I cannot judge what is the best value to use as default one, short or long.

@AlexandreDecan
Copy link
Collaborator Author

That's a good point :-) I would say the fact that the output of the tool can be very large just due to the fact that we report on the full values (by default) being added/changed/removed makes it barely readable in some situations.

For traditional text-based diff tools, it makes sense to report about the content of the changes since line numbers are not bringing any information (that's also why most of these tools have an option to specify how many "context" lines should be outputted as well). But in the case of a YAML file (and more specifically, a GHA workflow file), the path (that replaces line numbers) already conveys an interesting piece of information. Who cares about seeing the full content of an added job, when you already know that "jobs.new_job" has been added? If the values are really required, it is enough to use the --long or --full-value (or any other name for this flag) option.

That's why I personally believe that the --short option should be applied by default, and replaced by a --long one (also because I think it's more intuitive to look at the documentation to see how to display more information when you seen ellipsis used when reporting about the values, rather than looking at the documentation to see how to prevent the tool from being too verbose).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants