diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92e3947..322b36d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,6 +41,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: golangci/golangci-lint-action@v2 + - uses: golangci/golangci-lint-action@v3 with: + version: v1.53 args: --timeout=5m diff --git a/.golangci.yml b/.golangci.yml index f0ac61c..348b9b4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -43,6 +43,8 @@ linters: # TODO: review the linters below. We disabled them to make the CI pass first. - nonamedreturns - exhaustruct + - nosnakecase + - nolintlint - ireturn - varnamelen - forcetypeassert diff --git a/default_validator.go b/default_validator.go index bd14c2a..670a177 100644 --- a/default_validator.go +++ b/default_validator.go @@ -170,7 +170,7 @@ func (d *defaultValidator) validateDefaultInResponse(resp *spec.Response, respon responseName, responseCodeAsStr := responseHelp.responseMsgVariants(responseType, responseCode) - // nolint: dupl + //nolint: dupl if response.Headers != nil { // Safeguard for nm, h := range response.Headers { // reset explored schemas to get depth-first recursive-proof exploration @@ -262,6 +262,7 @@ func (d *defaultValidator) validateDefaultValueSchemaAgainstSchema(path, in stri } // TODO: Temporary duplicated code. Need to refactor with examples + // nolint: dupl func (d *defaultValidator) validateDefaultValueItemsAgainstSchema(path, in string, root interface{}, items *spec.Items) *Result { res := new(Result) diff --git a/helpers.go b/helpers.go index 48ebfab..dc376f7 100644 --- a/helpers.go +++ b/helpers.go @@ -250,7 +250,7 @@ func (h *paramHelper) resolveParam(path, method, operationID string, param *spec } if err != nil { // Safeguard - // NOTE: we may enter enter here when the whole parameter is an unresolved $ref + // NOTE: we may enter here when the whole parameter is an unresolved $ref refPath := strings.Join([]string{"\"" + path + "\"", method}, ".") errorHelp.addPointerError(res, err, param.Ref.String(), refPath) return nil, res