Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkers: add sqlQuery checker #932

Merged
merged 1 commit into from May 26, 2020
Merged

Conversation

quasilyte
Copy link
Member

Reports _, err := db.Query() pattern.
Suggests to use Exec() instead of Query in this case.

Signed-off-by: Iskander Sharipov quasilyte@gmail.com

@quasilyte quasilyte force-pushed the quasilyte/addCheck/sqlQuery branch from 684b093 to 97aa1e7 Compare May 26, 2020 21:46
checkers/sqlQuery_checker.go Outdated Show resolved Hide resolved
@quasilyte quasilyte force-pushed the quasilyte/addCheck/sqlQuery branch from 97aa1e7 to 8269868 Compare May 26, 2020 22:04
un000
un000 previously approved these changes May 26, 2020
cristaloleg
cristaloleg previously approved these changes May 26, 2020
Copy link
Member

@cristaloleg cristaloleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎉🎉

checkers/sqlQuery_checker.go Outdated Show resolved Hide resolved
checkers/sqlQuery_checker.go Outdated Show resolved Hide resolved
case "Query", "QueryContext":
// Stdlib and friends.
case "Queryx", "QueryxContext":
// sqlx.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

@quasilyte quasilyte dismissed stale reviews from cristaloleg and un000 via 195e06a May 26, 2020 22:20
@quasilyte quasilyte force-pushed the quasilyte/addCheck/sqlQuery branch 2 times, most recently from 195e06a to 6953d34 Compare May 26, 2020 22:26
cristaloleg
cristaloleg previously approved these changes May 26, 2020
Reports `_, err := db.Query()` pattern.
Suggests to use Exec() instead of Query in this case.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
@quasilyte
Copy link
Member Author

Added aliases test. PR needs approval again.

@quasilyte quasilyte merged commit d6fa699 into master May 26, 2020
@quasilyte quasilyte deleted the quasilyte/addCheck/sqlQuery branch May 26, 2020 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants