diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce2f9a4a..1dc30d79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,17 @@ jobs: - run: go test ./... - run: go build ./... + lint: + name: Staticcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-go@v6 + with: + go-version: "1.25" + - run: go install honnef.co/go/tools/cmd/staticcheck@v0.7.0 + - run: staticcheck ./... + release-build: name: Release binary build runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b0fa00c..af0f8d0c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,8 @@ jobs: go-version: "1.25" - run: go install golang.org/x/vuln/cmd/govulncheck@latest - run: govulncheck ./... + - run: go install honnef.co/go/tools/cmd/staticcheck@v0.7.0 + - run: staticcheck ./... - run: go vet ./... - run: go test ./... - run: go build ./... diff --git a/cmd/logout.go b/cmd/logout.go index ef2ff0ef..3ae145cf 100644 --- a/cmd/logout.go +++ b/cmd/logout.go @@ -54,7 +54,7 @@ var revokeAccessToken = func(domain string, token string) error { // Command logout revokes all saved API tokens and deletes auth.json. func logout(cmd *cobra.Command, args []string) error { if os.Getenv(envAccessToken) != "" { - return newCodedError(jsonErrorCodeEnvTokenStillActive, errors.New("DBXCLI_ACCESS_TOKEN is set; unset it before running logout.")) + return newCodedError(jsonErrorCodeEnvTokenStillActive, errors.New("DBXCLI_ACCESS_TOKEN is set; unset it before running logout")) } filePath, err := authFilePath()