• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

AfterShip / clickhouse-sql-parser / 27258265881
52%
master: 52%

Build:
Build:
LAST BUILD BRANCH: structured-parse-errors
DEFAULT BRANCH: master
Ran 10 Jun 2026 06:42AM UTC
Jobs 1
Files 15
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Jun 2026 06:40AM UTC coverage: 51.79% (+0.1%) from 51.662%
27258265881

Pull #273

github

git-hulk
Fix nil-pointer dereference when formatting errors at EOF

Error messages built with `fmt.Errorf("... %q", p.last().String)` panic when
the lexer is at EOF, because `p.last()` is nil. Inputs like `ALTER `,
`SELECT*FROM A(0A` and `SET A=` triggered this.

Add a nil-safe `lastTokenString()` helper (mirroring `lastTokenKind()`) that
returns "<EOF>" when there is no current token, and use it in the 11 error
paths in parser_table.go and parser_alter.go. Success paths where last() is
provably non-nil are left untouched.

Add the inputs above to TestParser_InvalidSyntax to reproduce: they panicked
before the fix and now return a proper error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull Request #273: Fix nil-pointer dereference when formatting errors at EOF

9 of 16 new or added lines in 3 files covered. (56.25%)

8291 of 16009 relevant lines covered (51.79%)

3014.6 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
68.56
0.56% parser/parser_table.go
1
73.22
0.0% parser/parser_alter.go
Jobs
ID Job ID Ran Files Coverage
1 27258265881.1 10 Jun 2026 06:42AM UTC 15
51.79
GitHub Action Run
Source Files on build 27258265881
  • Tree
  • List 15
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #273
  • PR Base - master (#25913331789)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc