From 39ba647fbb11ad594e2c1375f65cd8f0356f5b08 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Sun, 8 Dec 2019 13:32:18 +0100 Subject: [PATCH 1/6] Fix codecov reports in GitHub actions Signed-off-by: Sascha Grunert --- .github/workflows/cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 5601b19..1de31e1 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -59,7 +59,7 @@ jobs: go run build.go toc docs/v2/manual.md - name: Send Coverage Report - if: success() + if: success() && matrix.go == 1.13 && matrix.os == 'ubuntu-latest' env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: bash <(curl -s https://codecov.io/bash) From f29ad2ad48349c92f5f43846c50d455dfbbd23e8 Mon Sep 17 00:00:00 2001 From: Liam Hampton Date: Thu, 12 Dec 2019 21:24:43 +0000 Subject: [PATCH 2/6] fix some golint errors show in go report card Signed-off-by: Liam Hampton --- category.go | 1 + errors.go | 1 + flag_path.go | 2 +- help.go | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/category.go b/category.go index d9e73a0..abd9dce 100644 --- a/category.go +++ b/category.go @@ -1,5 +1,6 @@ package cli +// CommandCategories allows for category manipulation type CommandCategories interface { // AddCommand adds a command to a category, creating a new category if necessary. AddCommand(category string, command *Command) diff --git a/errors.go b/errors.go index be58903..f9cb4e0 100644 --- a/errors.go +++ b/errors.go @@ -48,6 +48,7 @@ func (m *multiError) Errors() []error { return errs } +// ErrorFormatter is the interface that will format the error output type ErrorFormatter interface { Format(s fmt.State, verb rune) } diff --git a/flag_path.go b/flag_path.go index d6b23c3..a322857 100644 --- a/flag_path.go +++ b/flag_path.go @@ -72,7 +72,7 @@ func (f *PathFlag) Apply(set *flag.FlagSet) error { return nil } -// String looks up the value of a local PathFlag, returns +// Path looks up the value of a local PathFlag, returns // "" if not found func (c *Context) Path(name string) string { if fs := lookupFlagSet(name, c); fs != nil { diff --git a/help.go b/help.go index aa5947d..c1e974a 100644 --- a/help.go +++ b/help.go @@ -138,7 +138,7 @@ func printFlagSuggestions(lastArg string, flags []Flag, writer io.Writer) { if bflag, ok := flag.(*BoolFlag); ok && bflag.Hidden { continue } - for _, name := range flag.Names(){ + for _, name := range flag.Names() { name = strings.TrimSpace(name) // this will get total count utf8 letters in flag name count := utf8.RuneCountInString(name) From 0f11fc8f30ad9ed9405ba70341d20f275d75f713 Mon Sep 17 00:00:00 2001 From: Liam Hampton Date: Thu, 12 Dec 2019 21:29:09 +0000 Subject: [PATCH 3/6] amend comments Signed-off-by: Liam Hampton --- category.go | 2 +- errors.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/category.go b/category.go index abd9dce..867e390 100644 --- a/category.go +++ b/category.go @@ -1,6 +1,6 @@ package cli -// CommandCategories allows for category manipulation +// CommandCategories interface allows for category manipulation type CommandCategories interface { // AddCommand adds a command to a category, creating a new category if necessary. AddCommand(category string, command *Command) diff --git a/errors.go b/errors.go index f9cb4e0..344b436 100644 --- a/errors.go +++ b/errors.go @@ -48,7 +48,7 @@ func (m *multiError) Errors() []error { return errs } -// ErrorFormatter is the interface that will format the error output +// ErrorFormatter is the interface that will suitably format the error output type ErrorFormatter interface { Format(s fmt.State, verb rune) } From 2eb5b301511593cd2abfdba94df3e22c9cdbfa8f Mon Sep 17 00:00:00 2001 From: "lynn [they]" Date: Thu, 12 Dec 2019 23:03:40 -0800 Subject: [PATCH 4/6] add codecov token --- .github/workflows/cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 1de31e1..90f8867 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -61,5 +61,5 @@ jobs: - name: Send Coverage Report if: success() && matrix.go == 1.13 && matrix.os == 'ubuntu-latest' env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: fa7ff1caed3c43c68ae994495a6469d8 run: bash <(curl -s https://codecov.io/bash) From a8fbae22aeb8c6811d8ca1ebf9c5ad37c4f0d9dd Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Fri, 13 Dec 2019 08:58:11 +0100 Subject: [PATCH 5/6] Add codecov action Signed-off-by: Sascha Grunert --- .github/workflows/cli.yml | 9 +++++---- appveyor.yml | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 90f8867..eb6da39 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -58,8 +58,9 @@ jobs: go run build.go gfmrun docs/v2/manual.md go run build.go toc docs/v2/manual.md - - name: Send Coverage Report + - name: Upload coverage to Codecov if: success() && matrix.go == 1.13 && matrix.os == 'ubuntu-latest' - env: - CODECOV_TOKEN: fa7ff1caed3c43c68ae994495a6469d8 - run: bash <(curl -s https://codecov.io/bash) + uses: codecov/codecov-action@v1 + with: + token: 0a8cc73b-bb7c-480b-8626-38a461643761 + fail_ci_if_error: true diff --git a/appveyor.yml b/appveyor.yml index 6ae54b2..f1cae90 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,10 +20,9 @@ install: - go version - go env - go get github.com/urfave/gfmrun/cmd/gfmrun - - go get golang.org/x/tools/cmd/goimports - go mod tidy build_script: - go run build.go vet - go run build.go test - - go run build.go gfmrun docs/v1/manual.md \ No newline at end of file + - go run build.go gfmrun docs/v1/manual.md From 106103ee7b3ebbde16f13fbb1540332c2cc9ebdb Mon Sep 17 00:00:00 2001 From: "lynn [they]" Date: Fri, 13 Dec 2019 19:54:14 -0800 Subject: [PATCH 6/6] Update app.go --- app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.go b/app.go index 09b13be..c04e9af 100644 --- a/app.go +++ b/app.go @@ -13,7 +13,7 @@ import ( ) var ( - changeLogURL = "https://github.com/urfave/cli/blob/master/CHANGELOG.md" + changeLogURL = "https://github.com/urfave/cli/blob/master/docs/CHANGELOG.md" appActionDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-action-signature", changeLogURL) contactSysadmin = "This is an error in the application. Please contact the distributor of this application if this is not you." errInvalidActionType = NewExitError("ERROR invalid Action type. "+