From b2e9cfd8ff118ba8c75c05099aa5fc1fd38df17f Mon Sep 17 00:00:00 2001 From: Ryan Olds Date: Sun, 29 Jan 2023 11:43:28 -0800 Subject: [PATCH] Partial tests. Removing Circle CI --- .circleci/config.yml | 28 ---------------------- README.md | 2 -- testdata/sqlx_examples/correct_defer.go | 2 +- testdata/sqlx_examples/correct_generics.go | 0 4 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 testdata/sqlx_examples/correct_generics.go diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d0c27bd..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2 -jobs: - build: - docker: - # specify the version - - image: cimg/go:1.19 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 - - #### TEMPLATE_NOTE: go expects specific checkout path representing url - #### expecting it in the form of - #### /go/src/github.com/circleci/go-tool - #### /go/src/bitbucket.org/circleci/go-tool - working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}} - steps: - - checkout - - # specify any bash command here prefixed with `run: ` - - run: go get -v -t -d ./... - - run: make lint - - run: make test - - run: make build diff --git a/README.md b/README.md index 0844a4f..351c537 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # sqlclosecheck -[![ryanrolds](https://circleci.com/gh/ryanrolds/sqlclosecheck.svg?style=svg)](https://app.circleci.com/pipelines/github/ryanrolds/sqlrowsclose) - Linter that checks if SQL rows/statements are closed. Unclosed rows and statements may cause DB connection pool exhaustion. diff --git a/testdata/sqlx_examples/correct_defer.go b/testdata/sqlx_examples/correct_defer.go index 4215f15..c93cbea 100644 --- a/testdata/sqlx_examples/correct_defer.go +++ b/testdata/sqlx_examples/correct_defer.go @@ -5,7 +5,7 @@ import ( "strings" ) -func correctDefer() { +func correctGenericDefer() { age := 27 rows, err := db.Queryx("SELECT name FROM users WHERE age=?", age) if err != nil { diff --git a/testdata/sqlx_examples/correct_generics.go b/testdata/sqlx_examples/correct_generics.go new file mode 100644 index 0000000..e69de29