Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## v2.51.0 - 2026-05-06

### Added

- linter: add file-level override to disable `assume_in_transaction` (#996). Thanks @reteps!

When using `assume-in-transaction`, you can disable it on a per file basis using a comment:

```sql
-- squawk-disable-assume-in-transaction
```

- syntax: add validation for `select into` (#1116)

Warn about invalid usages, such as:
- `select 4 a union select 5 a into t;`
- `with t as (select 1 a into t) select * from t;`
- `select * from t where a in (select 1 a into t);`

and more!

- parser: add empty statement to ast (#1111)

```sql
;
;
;
```

now gives:

```
SOURCE_FILE@0..5
EMPTY_STMT@0..1
SEMICOLON@0..1 ";"
WHITESPACE@1..2 "\n"
EMPTY_STMT@2..3
SEMICOLON@2..3 ";"
WHITESPACE@3..4 "\n"
EMPTY_STMT@4..5
SEMICOLON@4..5 ";"
```

- ide: code actions create table as <-> select into + parser fix (#1113)

Create table and select into are roughly interchangable, so this code action
supports switching between.

- ide: show comments for types and columns (#1110)
- ide: hover infer more types for columns (#1109, #1108)

### Changed

- parser: cleanup insert & create rule ast grammar to be more strict (#1112)

### Fixed

- vscode: fix text mate grammar for multiple stmts on a line (#1115)
- ide: fix infer column name w/ column aliases and goto def (#1118)
- ide: fix output column alias resolution in group by / order by (#1117)
- ide: fix inherit/like resolution + cte fixes (#1107)

## v2.50.0 - 2026-05-01

### Added
Expand Down
76 changes: 64 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "2.50.0"
version = "2.51.0"
edition = "2024"
rust-version = "1.94"
authors = ["Squawk Team & Contributors"]
Expand Down Expand Up @@ -44,6 +44,7 @@ rowan = "0.15.15"
salsa = "0.26.0"
smol_str = "0.3.2"
enum-iterator = "2.1.0"
jiff = "0.2.24"
itertools = "0.14.0"
line-index = "0.1.2"
lsp-server = "0.7.8"
Expand Down Expand Up @@ -78,14 +79,14 @@ rustc-hash = "2.1.1"

# local
# we have to make the versions explicit otherwise `cargo publish` won't work
squawk-github = { path = "./crates/squawk_github", version = "2.50.0" }
squawk-ide = { path = "./crates/squawk_ide", version = "2.50.0" }
squawk-lexer = { path = "./crates/squawk_lexer", version = "2.50.0" }
squawk-parser = { path = "./crates/squawk_parser", version = "2.50.0" }
squawk-syntax = { path = "./crates/squawk_syntax", version = "2.50.0" }
squawk-linter = { path = "./crates/squawk_linter", version = "2.50.0" }
squawk-server = { path = "./crates/squawk_server", version = "2.50.0" }
squawk-thread = { path = "./crates/squawk_thread", version = "2.50.0" }
squawk-github = { path = "./crates/squawk_github", version = "2.51.0" }
squawk-ide = { path = "./crates/squawk_ide", version = "2.51.0" }
squawk-lexer = { path = "./crates/squawk_lexer", version = "2.51.0" }
squawk-parser = { path = "./crates/squawk_parser", version = "2.51.0" }
squawk-syntax = { path = "./crates/squawk_syntax", version = "2.51.0" }
squawk-linter = { path = "./crates/squawk_linter", version = "2.51.0" }
squawk-server = { path = "./crates/squawk_server", version = "2.51.0" }
squawk-thread = { path = "./crates/squawk_thread", version = "2.51.0" }

[workspace.lints.clippy]
collapsible_else_if = "allow"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ to your project's `.pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/sbdchd/squawk
rev: 2.50.0
rev: 2.51.0
hooks:
- id: squawk
files: path/to/postgres/migrations/written/in/sql
Expand Down
2 changes: 1 addition & 1 deletion crates/squawk_github/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use serde_json::Value;
use std::time::Duration;
use std::time::{SystemTime, UNIX_EPOCH};

pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.50.0";
pub(crate) const SQUAWK_USER_AGENT: &str = "squawk/2.51.0";

#[derive(Debug, Serialize)]
struct CommentBody {
Expand Down
2 changes: 2 additions & 0 deletions crates/xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ anyhow.workspace = true
csv.workspace = true
clap.workspace = true
enum-iterator.workspace = true
jiff.workspace = true
toml.workspace = true
serde.workspace = true
serde_json.workspace = true
convert_case.workspace = true
Expand Down
13 changes: 9 additions & 4 deletions crates/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ use codegen::codegen;
use new_rule::new_lint;
use sync_builtins::sync_builtins;
use sync_pg::sync_pg;
use update_version::{UpdateVersionArgs, update_version};

mod codegen;
mod keywords;
mod new_rule;
mod path;
mod sync_builtins;
mod sync_pg;
mod update_version;

#[derive(Subcommand, Debug)]
enum TaskName {
#[command(long_about = "Generate code for AST, SyntaxKind, and TokenSets")]
Codegen,
#[command(long_about = "Create a new linter rule")]
NewRule(NewRuleArgs),
#[command(long_about = "Fetch the latest kwlist.h and regression suite from Postgres")]
SyncPg,
#[command(long_about = "Generate builtins.sql from PostgreSQL pg_type catalog")]
SyncBuiltins,
#[command(long_about = "Fetch the latest kwlist.h and regression suite from Postgres")]
SyncPg,
#[command(long_about = "Bump the squawk version across all version-bearing files")]
UpdateVersion(UpdateVersionArgs),
}

#[derive(Args, Debug)]
Expand All @@ -42,9 +46,10 @@ struct Arguments {
fn main() -> Result<()> {
let args = Arguments::parse();
match args.task {
TaskName::SyncPg => sync_pg(),
TaskName::NewRule(args) => new_lint(args),
TaskName::Codegen => codegen(),
TaskName::NewRule(args) => new_lint(args),
TaskName::SyncBuiltins => sync_builtins(),
TaskName::SyncPg => sync_pg(),
TaskName::UpdateVersion(args) => update_version(args),
}
}
Loading
Loading