urfave / cli

A simple, fast, and fun package for building command line apps in Go
https://cli.urfave.org
MIT License
21.91k stars 1.69k forks source link

adjust tests for HideDefault #1937

Closed Skeeve closed 3 days ago

Skeeve commented 4 days ago

What type of PR is this?

What this PR does / why we need it:

It gives the option to hide default values from help output.

It also suppresses the (default: false) from the standard --version and --help as those make absolutely no sense.

Which issue(s) this PR fixes:

1925

Testing

I changed all standard tests to account for the new help output.

Release Notes

Default values for the automatic help texts of --help and --version will be suppressed.

It's also possible to suppress output of a flag's default value by setting the flag's HideDefault to true.

dearchap commented 3 days ago

@Skeeve Can you fix the conflicts with your PR and main and also run "make v3approve" in your workspace ?

Skeeve commented 3 days ago

Can you fix the conflicts with your PR and main

Is it the "diffcheck" you mean?~

You meant the PR you applied yesterday which conflichts with what I did.

I ran v3approve here and this is what I got:

I have no name!@708b2feadea9:/cli$ make v3approve
go run internal/build/build.go  v3approve 
# ---> /usr/bin/git rev-parse --show-toplevel
# ---> /usr/bin/cp -v godoc-current.txt testdata/godoc-v3.x.txt
'godoc-current.txt' -> 'testdata/godoc-v3.x.txt'
I have no name!@708b2feadea9:/cli$ 

What's the purpose of "v3approve"?

Skeeve commented 3 days ago

I have no idea how to fix the make diffcheck.

dearchap commented 3 days ago

@Skeeve after running make v3approve you have to commit the 2 generated files. I did that for you

Skeeve commented 3 days ago

@Skeeve after running make v3approve you have to commit the 2 generated files. I did that for you

Thanks, but on my side, nothing was generated :( At least I should have seen something with git status, right?