Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Lint inline SQL in GoNew to Visual Studio Code? Get it now.
Lint inline SQL in Go

Lint inline SQL in Go

Kamran Ansari

|
135 installs
| (0) | Free
Parses out and shows errors for sql statements defined as string in go files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

lint-inline-sql-in-go README

Lint inline SQL in Go helps you lint inline Postgres SQL statements in your golang code.

Features

Catch syntax errors in your inline SQL

Highlights syntax errors in inline SQL

Warns when number of parameters does not match in a INSERT query

Number of parameters does not match in INSERT query

Catch missing parameters in order

Missing parameters in order

Requirements

The extension uses and wouldn't be possible without pgsql-ast-parser. No set up required from user's end.

Extension Settings

This extension contributes the following settings:

  • lintInlineSQLInGo.sqlRegex: To match sql statements in your code. Defaults to "`([^`]*)`" ie it matches all tilde quoted strings.

For example, to match only tilde quoted strings which are assigned to a sql variable you can do something like -

  "lintInlineSQLInGo.sqlRegex": "sql := `([^`]*)`"

Known Issues

No known issues. But syntax errors can be improved from default error messages that we get from parser.

Release Notes

0.0.3

  • Rename display name for the extension

0.0.2

  • Fix screenshots in README

0.0.1

Initial release.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft