Commit Graph

2357 Commits

Author SHA1 Message Date
Naveen Gogineni
fcb0bce797
Fix failed test 2022-10-09 10:09:36 -04:00
Naveen Gogineni
924ebdaab2
Fix:(issue_1500). Fix slice flag value duplication issue 2022-10-09 10:09:36 -04:00
Naveen Gogineni
ea2893084b
Remove extra 3 spaces in last line 2022-10-09 09:59:46 -04:00
Naveen Gogineni
9a9461928a
Add test coverage for Command.VisibleCommands() 2022-10-09 09:59:46 -04:00
dearchap
a4b7759ad1
Update template.go
Co-authored-by: Anatoli Babenia <anatoli@rainforce.org>
2022-10-09 09:59:35 -04:00
Naveen Gogineni
dccd762cbb
Componentize template 2022-10-09 09:59:35 -04:00
Naveen Gogineni
c86805de7c
Add test case 2022-10-09 09:59:35 -04:00
Naveen Gogineni
ae8c5118f2
Fix command help subcommand 2022-10-09 09:59:35 -04:00
Naveen Gogineni
13860a7c4d
Fix:(issue_1505) Fix flag alignment in help 2022-10-09 09:59:35 -04:00
Jakub Nowakowski
b82e628617
Add unit test for GenericFlag Destination parsing
The test checks if Destination provided in GenericFlag is being set as
expected.
2022-10-09 09:57:25 -04:00
Jakub Nowakowski
01bdec784f
Set destination in GenericFlag apply function
The function was missing destination configuration.
2022-10-09 09:57:25 -04:00
c5057d195e
Only run generate on go 1.19 2022-10-09 09:51:19 -04:00
65c98c86ad
Ensure "generate" step runs in CI prior to diff check 2022-10-09 09:51:19 -04:00
Felix Lange
82ea9f70c0
Call FlagStringer in String() method of slice flags
The default help template relies on the String() method of Flag
to render the flag. For most flag types, String() indirects through
FlagStringer, so that is the best place to customize flag rendering.

FlagStringer was not called for slice flags because their help output
differs from other flags in two ways: there can be multiple default
values, and the flag name is shown two times to indicate that the flag
can be specified multiple times.

To make multiple values work in the FlagStringer, I simply changed
GetValue() to return all values.

Showing the flag more than once is achieved through a new interface,
DocGenerationSliceFlag, which the FlagStringer uses to decide whether
the flag is a slice flag type.
2022-10-09 09:50:12 -04:00
Anatoli Babenia
4959a9fa9b
Refactor wrap() and add test for empty line 2022-10-09 09:33:19 -04:00
Anatoli Babenia
e14dca7a18
Run go fmt 2022-10-09 09:33:19 -04:00
Anatoli Babenia
05fb755b6a
wrap: Simplify loop logic
Suggested by @julian7
2022-10-09 09:33:19 -04:00
Anatoli Babenia
d3bb381a0b
Fix test for removed trailing whitespace 2022-10-09 09:33:19 -04:00
Anatoli Babenia
a6f5ca69f4
wrap: Avoid trailing whitespace for empty lines 2022-10-09 09:33:19 -04:00
dearchap
9166808eb5
Merge pull request #1510 from urfave/v3-porting
Porting to v3
2022-10-05 22:22:08 -04:00
a851a773a8
Point docs tests at v3 2022-10-03 10:12:37 -04:00
f8faf77e43
Post-porting fixes for v3 2022-10-03 10:06:01 -04:00
5db9db6d38
Remove nonexistent phony targets
so that running `make` or `make all` only runs targets that exist.
2022-10-03 09:46:48 -04:00
Naveen Gogineni
8ef92d2a24
Remove un-needed func 2022-10-03 09:46:31 -04:00
Naveen Gogineni
c2ecb4469f
Remove un-needed func 2022-10-03 09:46:31 -04:00
Naveen Gogineni
57ff098ca7
Fix:(issue_557) Make help output consistent between different invocations 2022-10-03 09:46:18 -04:00
Naveen Gogineni
4c637d8ac7
Fix:(issue_557) Change app help name 2022-10-03 09:35:00 -04:00
Wendell Sun
126297af13
Add more test cases 2022-10-03 09:34:46 -04:00
Wendell Sun
1e30f50959
make v2approve 2022-10-03 09:34:46 -04:00
Wendell Sun
d213683bee
Rebase main, update flag-spec.yaml to add Action field 2022-10-03 09:34:46 -04:00
Wendell Sun
f9ceca5dfa
Add more tests about flag-level action 2022-10-03 08:29:30 -04:00
Wendell Sun
e2e14ec6ef
feat: flag action 2022-10-03 08:28:44 -04:00
torwang
a2c3729797
fix: Context.Set no such flag 2022-10-03 08:15:41 -04:00
Naveen Gogineni
e9e87f624d
Add unit tests 2022-10-03 08:15:23 -04:00
Naveen Gogineni
d2acd0ed55
Fix:(issue_1197) Set destination field from altsrc for slice flags 2022-10-03 08:15:23 -04:00
1c3ebfab32
Accept the MKDOCS_REMOTE_GITHUB_TOKEN var as intended 2022-10-03 08:15:01 -04:00
9ed5a09fbb
Use correct env var for global flags 2022-10-03 08:14:38 -04:00
d6c9f6a898
Replace a few more custom make targets 2022-10-03 08:14:38 -04:00
0593812915
Only run make v2diff on go 1.19.x + ubuntu-latest 2022-10-03 08:14:38 -04:00
2bec081c3a
Use windows compatible path append 2022-10-03 08:14:38 -04:00
d9d960a58a
Run make target after the Makefile is available 2022-10-03 08:14:37 -04:00
8cc0a9c5da
Move more functionality into internal/build/build.go
and use make targets in CI, pass flag spec YAML through yq

includes result of running `make v2approve`
2022-10-03 08:14:37 -04:00
Naveen Gogineni
8e3fa067e0
Fix: Help name consistency among app/commands and subcommands 2022-10-03 07:59:02 -04:00
Naveen Gogineni
e13c16bb10
Fix: dont generate pointer for dest for Generic flag 2022-10-03 07:58:43 -04:00
0658d61a0e
Set codecov status thresholds to 5%
and rename file to be less dotty
2022-10-03 07:49:45 -04:00
Naveen Gogineni
9c5b385796
Add additional test to fix codecov 2022-10-03 07:48:57 -04:00
Naveen Gogineni
5b96605ae5
Add additional test to fix codecov 2022-10-03 07:48:57 -04:00
Naveen Gogineni
2a5960c1cb
Add coverage threshold 2022-10-03 07:48:57 -04:00
Naveen Gogineni
9bcffd07a4
Merge from main 2022-10-03 07:48:56 -04:00
Naveen Gogineni
7405a90b38
Fix formatting 2022-10-03 07:48:56 -04:00