Skip to content

Add plt print command for purple playlists#886

Merged
statik merged 3 commits into
mainfrom
plt-phase-1
Jun 12, 2026
Merged

Add plt print command for purple playlists#886
statik merged 3 commits into
mainfrom
plt-phase-1

Conversation

@statik

@statik statik commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

First phase of the plt command group for working with purple playlist
exports (a ZIP container holding a SQLite database, produced by the source
app for queuing media in live events).

This phase delivers vbs plt print <playlist>, which parses a playlist and
prints its cues offline — no media is downloaded.

  • Format sniffer detects playlists by content, not file extension, and
    rejects invalid files with a named reason (not a zip, missing manifest,
    non-SQLite database, or missing required tables). Unverified schema
    versions warn but proceed when the required tables are present.
  • Parser reads the verified table contract into an ordered domain model:
    items, published-media locations (pub/track, book/chapter, docid shapes), embedded
    image cues, and segment markers.
  • plt print renders an aligned table (position, label, source, duration,
    marker count, raw end action) with a --json flag for the same data.
  • Synthetic fixture generator builds playlist zips in-test (SQLite +
    manifest + 1×1 JPEGs) covering every source shape, so tests never depend on
    real exports.
  • Vendor-neutrality guard (scripts/check-vendor-neutral.sh, wired into
    the lint workflow) rejects the publisher's identifiers in authored files.

modernc.org/sqlite (pure-Go, no CGO) is promoted from an indirect to a
direct dependency.

Test Plan

  • go test ./cmd/ green (helpers, sniffer, parser, print; tick
    conversion, slugging, language resolution, all four source shapes)
  • bazel build //cmd:go_default_library and bazel test //cmd:go_default_test green
  • gofmt, go vet ./cmd/, go build ./..., go mod verify clean
  • funlen / gocyclo / lll within limits
  • Manually verified against a real 15-item export: 15 items, 10 markers
    across 8 items, 1 image cue, correct source descriptions
  • Vendor guard passes on the tree and fails on an injected string

@statik statik added the feature label Jun 11, 2026
Comment thread cmd/plt_fixture_test.go
"path/filepath"
"testing"

_ "modernc.org/sqlite"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
import 'modernc.org/sqlite' is not allowed from list 'Main' (depguard)

Comment thread cmd/plt_parse.go
"path/filepath"
"strings"

_ "modernc.org/sqlite" // registers the pure-Go "sqlite" database/sql driver

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
import 'modernc.org/sqlite' is not allowed from list 'Main' (depguard)

Comment thread cmd/plt_fixture_test.go
`INSERT INTO TagMap VALUES (3, 1, 3, 2)`,
`INSERT INTO TagMap VALUES (4, 1, 4, 3)`,

`INSERT INTO Location VALUES (1, NULL, NULL, 1102016935, 135, 'sjj', 420, 0)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Duplicate words (NULL,) found (dupword)

Comment thread cmd/plt_fixture_test.go
`INSERT INTO TagMap VALUES (4, 1, 4, 3)`,

`INSERT INTO Location VALUES (1, NULL, NULL, 1102016935, 135, 'sjj', 420, 0)`,
`INSERT INTO Location VALUES (2, 23, 5, NULL, NULL, 'nwt', 420, 0)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Duplicate words (NULL,) found (dupword)

Comment thread cmd/plt_fixture_test.go

`INSERT INTO Location VALUES (1, NULL, NULL, 1102016935, 135, 'sjj', 420, 0)`,
`INSERT INTO Location VALUES (2, 23, 5, NULL, NULL, 'nwt', 420, 0)`,
`INSERT INTO Location VALUES (4, NULL, NULL, 1112024040, 1, NULL, 420, 3)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Duplicate words (NULL,) found (dupword)

Comment thread cmd/plt_sniff_test.go
}

func TestSniffPlaylist_UnverifiedSchemaProceeds(t *testing.T) {
path := writePlaylistFixture(t, fixtureOptions{schemaVersion: 99})

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
cmd.fixtureOptions is missing fields omitTables, omitManifest, notZip, corruptDB, databaseName (exhaustruct)

Comment thread cmd/plt_fixture_test.go
// fixtureSchema returns CREATE statements for every table except those omitted.
func fixtureSchema(omit map[string]bool) []string {
tables := map[string]string{
"Tag": `CREATE TABLE Tag (TagId INTEGER PRIMARY KEY, Name TEXT, Type INTEGER)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string Tag has 3 occurrences, make it a constant (goconst)

Comment thread cmd/plt_fixture_test.go
func fixtureSchema(omit map[string]bool) []string {
tables := map[string]string{
"Tag": `CREATE TABLE Tag (TagId INTEGER PRIMARY KEY, Name TEXT, Type INTEGER)`,
"TagMap": `CREATE TABLE TagMap (TagMapId INTEGER PRIMARY KEY, TagId INTEGER, PlaylistItemId INTEGER, Position INTEGER)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string TagMap has 3 occurrences, make it a constant (goconst)

Comment thread cmd/plt_fixture_test.go
tables := map[string]string{
"Tag": `CREATE TABLE Tag (TagId INTEGER PRIMARY KEY, Name TEXT, Type INTEGER)`,
"TagMap": `CREATE TABLE TagMap (TagMapId INTEGER PRIMARY KEY, TagId INTEGER, PlaylistItemId INTEGER, Position INTEGER)`,
"PlaylistItem": `CREATE TABLE PlaylistItem (PlaylistItemId INTEGER PRIMARY KEY, Label TEXT, StartTrimOffsetTicks INTEGER, EndTrimOffsetTicks INTEGER, EndAction INTEGER, ThumbnailFilePath TEXT)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string PlaylistItem has 3 occurrences, make it a constant (goconst)

Comment thread cmd/plt_fixture_test.go
"Tag": `CREATE TABLE Tag (TagId INTEGER PRIMARY KEY, Name TEXT, Type INTEGER)`,
"TagMap": `CREATE TABLE TagMap (TagMapId INTEGER PRIMARY KEY, TagId INTEGER, PlaylistItemId INTEGER, Position INTEGER)`,
"PlaylistItem": `CREATE TABLE PlaylistItem (PlaylistItemId INTEGER PRIMARY KEY, Label TEXT, StartTrimOffsetTicks INTEGER, EndTrimOffsetTicks INTEGER, EndAction INTEGER, ThumbnailFilePath TEXT)`,
"PlaylistItemLocationMap": `CREATE TABLE PlaylistItemLocationMap (PlaylistItemId INTEGER, LocationId INTEGER, MajorMultimediaType INTEGER, BaseDurationTicks INTEGER)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string PlaylistItemLocationMap has 3 occurrences, make it a constant (goconst)

@statik statik left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

golangci

🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestResolveLanguage missing the call to method parallel in test Run (paralleltest)

for _, tc := range cases {


🚫 [golangci] reported by reviewdog 🐶
Function TestSlugify missing the call to method parallel (paralleltest)

func TestSlugify(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestSlugify missing the call to method parallel in test Run (paralleltest)

for _, tc := range cases {


🚫 [golangci] reported by reviewdog 🐶
Function TestUniqueSlug missing the call to method parallel (paralleltest)

func TestUniqueSlug(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestParsePlaylist_NameAndOrder missing the call to method parallel (paralleltest)

func TestParsePlaylist_NameAndOrder(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestParsePlaylist_PubTrackItem missing the call to method parallel (paralleltest)

func TestParsePlaylist_PubTrackItem(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestParsePlaylist_BibleItemMarkers missing the call to method parallel (paralleltest)

func TestParsePlaylist_BibleItemMarkers(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestParsePlaylist_ImageCue missing the call to method parallel (paralleltest)

func TestParsePlaylist_ImageCue(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestParsePlaylist_DocidItem missing the call to method parallel (paralleltest)

func TestParsePlaylist_DocidItem(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestDescribeSource missing the call to method parallel (paralleltest)

func TestDescribeSource(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestDescribeSource missing the call to method parallel in test Run (paralleltest)

for _, tc := range cases {


🚫 [golangci] reported by reviewdog 🐶
Function TestBuildPrintView missing the call to method parallel (paralleltest)

func TestBuildPrintView(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestRenderJSON_RoundTrips missing the call to method parallel (paralleltest)

func TestRenderJSON_RoundTrips(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestRenderText_ContainsKeyData missing the call to method parallel (paralleltest)

func TestRenderText_ContainsKeyData(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_AcceptsValidRenamedFile missing the call to method parallel (paralleltest)

func TestSniffPlaylist_AcceptsValidRenamedFile(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_Rejections missing the call to method parallel (paralleltest)

func TestSniffPlaylist_Rejections(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestSniffPlaylist_Rejections missing the call to method parallel in test Run (paralleltest)

for _, tc := range cases {


🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_UnverifiedSchemaProceeds missing the call to method parallel (paralleltest)

func TestSniffPlaylist_UnverifiedSchemaProceeds(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
integer-format: fmt.Sprintf can be replaced with faster strconv.Itoa (perfsprint)

vbs/cmd/plt.go

Line 211 in fbf96f6

markers = fmt.Sprintf("%d", len(it.Markers))


🚫 [golangci] reported by reviewdog 🐶
parameter name 'p' is too short for the scope of its usage (varnamelen)

vbs/cmd/plt.go

Line 86 in fbf96f6

func resolveInputPath(p string) string {


🚫 [golangci] reported by reviewdog 🐶
variable name 'it' is too short for the scope of its usage (varnamelen)

vbs/cmd/plt.go

Line 123 in fbf96f6

for _, it := range pl.Items {


🚫 [golangci] reported by reviewdog 🐶
variable name 'it' is too short for the scope of its usage (varnamelen)

vbs/cmd/plt.go

Line 208 in fbf96f6

for _, it := range view.Items {


🚫 [golangci] reported by reviewdog 🐶
variable name 'zw' is too short for the scope of its usage (varnamelen)

zw := zip.NewWriter(&buf)


🚫 [golangci] reported by reviewdog 🐶
variable name 'db' is too short for the scope of its usage (varnamelen)

db, err := sql.Open("sqlite", dbPath)


🚫 [golangci] reported by reviewdog 🐶
parameter name 'id' is too short for the scope of its usage (varnamelen)

func resolveLanguage(id int, override string) (string, error) {


🚫 [golangci] reported by reviewdog 🐶
variable name 'b' is too short for the scope of its usage (varnamelen)

var b strings.Builder


🚫 [golangci] reported by reviewdog 🐶
variable name 'b' is too short for the scope of its usage (varnamelen)

var b strings.Builder


🚫 [golangci] reported by reviewdog 🐶
variable name 'r' is too short for the scope of its usage (varnamelen)

for _, r := range s {


🚫 [golangci] reported by reviewdog 🐶
variable name 'zr' is too short for the scope of its usage (varnamelen)

zr, err := zip.OpenReader(path)


🚫 [golangci] reported by reviewdog 🐶
parameter name 'a' is too short for the scope of its usage (varnamelen)

func parsePlaylist(a *archive) (*Playlist, error) {


🚫 [golangci] reported by reviewdog 🐶
variable name 'db' is too short for the scope of its usage (varnamelen)

db, err := sql.Open("sqlite", a.dbPath)


🚫 [golangci] reported by reviewdog 🐶
variable name 'it' is too short for the scope of its usage (varnamelen)

it Item


🚫 [golangci] reported by reviewdog 🐶
variable name 'm' is too short for the scope of its usage (varnamelen)

m Marker


🚫 [golangci] reported by reviewdog 🐶
variable name 'f' is too short for the scope of its usage (varnamelen)

f, err := os.Open(path)


🚫 [golangci] reported by reviewdog 🐶
variable name 'rc' is too short for the scope of its usage (varnamelen)

rc, err := entry.Open()


🚫 [golangci] reported by reviewdog 🐶
variable name 'rc' is too short for the scope of its usage (varnamelen)

rc, err := entry.Open()


🚫 [golangci] reported by reviewdog 🐶
variable name 'db' is too short for the scope of its usage (varnamelen)

db, err := sql.Open("sqlite", dbPath)


🚫 [golangci] reported by reviewdog 🐶
variable name 'pl' is too short for the scope of its usage (varnamelen)

pl := parseFixture(t)


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

vbs/cmd/plt.go

Line 58 in fbf96f6

defer func() { _ = arc.Close() }()


🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

vbs/cmd/plt.go

Line 77 in fbf96f6

if err != nil {


🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

vbs/cmd/plt.go

Line 90 in fbf96f6

if wd := os.Getenv("BUILD_WORKING_DIRECTORY"); wd != "" {


🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)

vbs/cmd/plt.go

Line 139 in fbf96f6

view.Items = append(view.Items, pi)


🚫 [golangci] reported by reviewdog 🐶
declarations should never be cuddled (wsl)

var buf bytes.Buffer


🚫 [golangci] reported by reviewdog 🐶
ranges should only be cuddled with assignments used in the iteration (wsl)

for _, name := range order {


🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)

stmts = append(stmts, tables[name])


🚫 [golangci] reported by reviewdog 🐶
anonymous switch statements should never be cuddled (wsl)

switch {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i := range want {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = rows.Close() }()


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = f.Close() }()


🚫 [golangci] reported by reviewdog 🐶
ranges should only be cuddled with assignments used in the iteration (wsl)

for _, table := range requiredTables {


🚫 [golangci] reported by reviewdog 🐶
expressions should not be cuddled with blocks (wsl)

t.Cleanup(func() { _ = arc.Close() })


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i, it := range pl.Items {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i, want := range wantLabels {


🚫 [golangci] reported by reviewdog 🐶
expressions should not be cuddled with blocks (wsl)

t.Cleanup(func() { _ = arc.Close() })


🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (too many statements above range) (wsl_v5)

want := []string{"talk", "talk-2", "talk-3", "other"}


🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (invalid statement above assign) (wsl_v5)

err := db.QueryRow(`SELECT Name FROM Tag WHERE Type = 2`).Scan(&name)

Comment thread cmd/plt_fixture_test.go
"TagMap": `CREATE TABLE TagMap (TagMapId INTEGER PRIMARY KEY, TagId INTEGER, PlaylistItemId INTEGER, Position INTEGER)`,
"PlaylistItem": `CREATE TABLE PlaylistItem (PlaylistItemId INTEGER PRIMARY KEY, Label TEXT, StartTrimOffsetTicks INTEGER, EndTrimOffsetTicks INTEGER, EndAction INTEGER, ThumbnailFilePath TEXT)`,
"PlaylistItemLocationMap": `CREATE TABLE PlaylistItemLocationMap (PlaylistItemId INTEGER, LocationId INTEGER, MajorMultimediaType INTEGER, BaseDurationTicks INTEGER)`,
"Location": `CREATE TABLE Location (LocationId INTEGER PRIMARY KEY, BookNumber INTEGER, ChapterNumber INTEGER, DocumentId INTEGER, Track INTEGER, KeySymbol TEXT, MepsLanguage INTEGER, Type INTEGER)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string Location has 3 occurrences, make it a constant (goconst)

Comment thread cmd/plt_fixture_test.go
"PlaylistItem": `CREATE TABLE PlaylistItem (PlaylistItemId INTEGER PRIMARY KEY, Label TEXT, StartTrimOffsetTicks INTEGER, EndTrimOffsetTicks INTEGER, EndAction INTEGER, ThumbnailFilePath TEXT)`,
"PlaylistItemLocationMap": `CREATE TABLE PlaylistItemLocationMap (PlaylistItemId INTEGER, LocationId INTEGER, MajorMultimediaType INTEGER, BaseDurationTicks INTEGER)`,
"Location": `CREATE TABLE Location (LocationId INTEGER PRIMARY KEY, BookNumber INTEGER, ChapterNumber INTEGER, DocumentId INTEGER, Track INTEGER, KeySymbol TEXT, MepsLanguage INTEGER, Type INTEGER)`,
"IndependentMedia": `CREATE TABLE IndependentMedia (IndependentMediaId INTEGER PRIMARY KEY, OriginalFilename TEXT, FilePath TEXT, MimeType TEXT, Hash TEXT)`,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string IndependentMedia has 3 occurrences, make it a constant (goconst)

Comment thread cmd/plt_fixture_test.go
"IndependentMedia": `CREATE TABLE IndependentMedia (IndependentMediaId INTEGER PRIMARY KEY, OriginalFilename TEXT, FilePath TEXT, MimeType TEXT, Hash TEXT)`,
"PlaylistItemIndependentMediaMap": `CREATE TABLE PlaylistItemIndependentMediaMap ` +
`(PlaylistItemId INTEGER, IndependentMediaId INTEGER, DurationTicks INTEGER)`,
"PlaylistItemMarker": `CREATE TABLE PlaylistItemMarker (PlaylistItemMarkerId INTEGER PRIMARY KEY, ` +

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string PlaylistItemMarker has 5 occurrences, make it a constant (goconst)

Comment thread cmd/plt_parse.go
// requiredTables are the database tables the parser depends on. Their presence
// is the contract that lets us read a playlist regardless of schema version.
var requiredTables = []string{
"Tag",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string Tag has 3 occurrences, make it a constant (goconst)

Comment thread cmd/plt_parse.go
// is the contract that lets us read a playlist regardless of schema version.
var requiredTables = []string{
"Tag",
"TagMap",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
string TagMap has 3 occurrences, make it a constant (goconst)

Comment thread cmd/plt_parse.go
}

dbPath := filepath.Join(tmpDir, "userData.db")
if err := os.WriteFile(dbPath, data, 0o600); err != nil {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Magic number: 0o600, in detected (mnd)

Comment thread cmd/plt_helpers.go
b.WriteRune(r)
}
prevHyphen = true
continue

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
continue with no blank line before (nlreturn)

Comment thread cmd/plt_helpers_test.go
"testing"
)

func TestTicksToSeconds(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestTicksToSeconds missing the call to method parallel (paralleltest)

Comment thread cmd/plt_helpers_test.go
{"image cue 4s", 40000000, 4.0},
}

for _, tc := range cases {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestTicksToSeconds missing the call to method parallel in test Run (paralleltest)

Comment thread cmd/plt_helpers_test.go
}
}

func TestResolveLanguage(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestResolveLanguage missing the call to method parallel (paralleltest)

@statik statik left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

golangci

🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_AcceptsValidRenamedFile missing the call to method parallel (paralleltest)

func TestSniffPlaylist_AcceptsValidRenamedFile(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_Rejections missing the call to method parallel (paralleltest)

func TestSniffPlaylist_Rejections(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestSniffPlaylist_Rejections missing the call to method parallel in test Run (paralleltest)

for _, tc := range cases {


🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_UnverifiedSchemaProceeds missing the call to method parallel (paralleltest)

func TestSniffPlaylist_UnverifiedSchemaProceeds(t *testing.T) {


🚫 [golangci] reported by reviewdog 🐶
integer-format: fmt.Sprintf can be replaced with faster strconv.Itoa (perfsprint)

vbs/cmd/plt.go

Line 236 in 1111b7d

markers = fmt.Sprintf("%d", len(it.Markers))


🚫 [golangci] reported by reviewdog 🐶
parameter name 'p' is too short for the scope of its usage (varnamelen)

vbs/cmd/plt.go

Line 82 in 1111b7d

func resolveInputPath(p string) string {


🚫 [golangci] reported by reviewdog 🐶
variable name 'it' is too short for the scope of its usage (varnamelen)

vbs/cmd/plt.go

Line 148 in 1111b7d

for _, it := range pl.Items {


🚫 [golangci] reported by reviewdog 🐶
variable name 'it' is too short for the scope of its usage (varnamelen)

vbs/cmd/plt.go

Line 233 in 1111b7d

for _, it := range view.Items {


🚫 [golangci] reported by reviewdog 🐶
variable name 'zw' is too short for the scope of its usage (varnamelen)

zw := zip.NewWriter(&buf)


🚫 [golangci] reported by reviewdog 🐶
variable name 'db' is too short for the scope of its usage (varnamelen)

db, err := sql.Open("sqlite", dbPath)


🚫 [golangci] reported by reviewdog 🐶
parameter name 'id' is too short for the scope of its usage (varnamelen)

func resolveLanguage(id int, override string) (string, error) {


🚫 [golangci] reported by reviewdog 🐶
variable name 'b' is too short for the scope of its usage (varnamelen)

var b strings.Builder


🚫 [golangci] reported by reviewdog 🐶
variable name 'b' is too short for the scope of its usage (varnamelen)

var b strings.Builder


🚫 [golangci] reported by reviewdog 🐶
variable name 'r' is too short for the scope of its usage (varnamelen)

for _, r := range s {


🚫 [golangci] reported by reviewdog 🐶
variable name 'zr' is too short for the scope of its usage (varnamelen)

zr, err := zip.OpenReader(path)


🚫 [golangci] reported by reviewdog 🐶
parameter name 'a' is too short for the scope of its usage (varnamelen)

func parsePlaylist(a *archive) (*Playlist, error) {


🚫 [golangci] reported by reviewdog 🐶
variable name 'db' is too short for the scope of its usage (varnamelen)

db, err := sql.Open("sqlite", a.dbPath)


🚫 [golangci] reported by reviewdog 🐶
variable name 'it' is too short for the scope of its usage (varnamelen)

it Item


🚫 [golangci] reported by reviewdog 🐶
variable name 'm' is too short for the scope of its usage (varnamelen)

m Marker


🚫 [golangci] reported by reviewdog 🐶
variable name 'f' is too short for the scope of its usage (varnamelen)

f, err := os.Open(path)


🚫 [golangci] reported by reviewdog 🐶
variable name 'rc' is too short for the scope of its usage (varnamelen)

rc, err := entry.Open()


🚫 [golangci] reported by reviewdog 🐶
variable name 'rc' is too short for the scope of its usage (varnamelen)

rc, err := entry.Open()


🚫 [golangci] reported by reviewdog 🐶
variable name 'db' is too short for the scope of its usage (varnamelen)

db, err := sql.Open("sqlite", dbPath)


🚫 [golangci] reported by reviewdog 🐶
variable name 'pl' is too short for the scope of its usage (varnamelen)

pl := parseFixture(t)


🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

vbs/cmd/plt.go

Line 73 in 1111b7d

if err != nil {


🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

vbs/cmd/plt.go

Line 86 in 1111b7d

if wd := os.Getenv("BUILD_WORKING_DIRECTORY"); wd != "" {


🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)

vbs/cmd/plt.go

Line 164 in 1111b7d

view.Items = append(view.Items, pi)


🚫 [golangci] reported by reviewdog 🐶
declarations should never be cuddled (wsl)

var buf bytes.Buffer


🚫 [golangci] reported by reviewdog 🐶
ranges should only be cuddled with assignments used in the iteration (wsl)

for _, name := range order {


🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)

stmts = append(stmts, tables[name])


🚫 [golangci] reported by reviewdog 🐶
anonymous switch statements should never be cuddled (wsl)

switch {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i := range want {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = rows.Close() }()


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = rc.Close() }()


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = rc.Close() }()


🚫 [golangci] reported by reviewdog 🐶
ranges should only be cuddled with assignments used in the iteration (wsl)

for _, table := range requiredTables {


🚫 [golangci] reported by reviewdog 🐶
expressions should not be cuddled with blocks (wsl)

t.Cleanup(func() { _ = arc.Close() })


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i, it := range pl.Items {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i, want := range wantLabels {


🚫 [golangci] reported by reviewdog 🐶
expressions should not be cuddled with blocks (wsl)

t.Cleanup(func() { _ = arc.Close() })


🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (too many statements above range) (wsl_v5)

want := []string{"talk", "talk-2", "talk-3", "other"}


🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (invalid statement above assign) (wsl_v5)

err := db.QueryRow(`SELECT Name FROM Tag WHERE Type = 2`).Scan(&name)

Comment thread cmd/plt.go
func checkPlaylistFile(path string) error {
if _, err := os.Stat(path); err != nil {
if errors.Is(err, os.ErrNotExist) {
return fmt.Errorf("no such file: %s", path)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("no such file: %s", path)" (err113)

Comment thread cmd/plt.go

var pltPrintJSON bool

var pltCmd = &coral.Command{

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
coral.Command is missing fields Aliases, SuggestFor, ValidArgs, ValidArgsFunction, Args, ArgAliases, BashCompletionFunction, Deprecated, Annotations, Version, PersistentPreRun, PersistentPreRunE, PreRun, PreRunE, Run, RunE, PostRun, PostRunE, PersistentPostRun, PersistentPostRunE, FParseErrWhitelist, CompletionOptions, TraverseChildren, Hidden, SilenceErrors, SilenceUsage, DisableFlagParsing, DisableAutoGenTag, DisableFlagsInUseLine, DisableSuggestions, SuggestionsMinimumDistance (exhaustruct)

Comment thread cmd/plt.go
vbs plt build meeting.playlist`,
}

var pltPrintCmd = &coral.Command{

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
coral.Command is missing fields Aliases, SuggestFor, ValidArgs, ValidArgsFunction, ArgAliases, BashCompletionFunction, Deprecated, Annotations, Version, PersistentPreRun, PersistentPreRunE, PreRun, PreRunE, RunE, PostRun, PostRunE, PersistentPostRun, PersistentPostRunE, FParseErrWhitelist, CompletionOptions, TraverseChildren, Hidden, SilenceErrors, SilenceUsage, DisableFlagParsing, DisableAutoGenTag, DisableFlagsInUseLine, DisableSuggestions, SuggestionsMinimumDistance (exhaustruct)

Comment thread cmd/plt.go
view := printView{Name: pl.Name, Items: make([]printItem, 0, len(pl.Items))}

for _, it := range pl.Items {
pi := printItem{

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
cmd.printItem is missing field Markers (exhaustruct)

Comment thread cmd/plt_print_test.go
}{
{
"pub track",
Item{Location: &Location{KeySymbol: "sjj", Track: 135, Type: 0}},

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
cmd.Item is missing fields Position, PlaylistItemID, Label, StartTrimTicks, EndTrimTicks, EndAction, ThumbnailPath, Image, Markers (exhaustruct)

Comment thread cmd/plt_print_test.go
}
}

func TestDescribeSource(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestDescribeSource missing the call to method parallel (paralleltest)

Comment thread cmd/plt_print_test.go
},
}

for _, tc := range cases {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestDescribeSource missing the call to method parallel in test Run (paralleltest)

Comment thread cmd/plt_print_test.go
}
}

func TestBuildPrintView(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestBuildPrintView missing the call to method parallel (paralleltest)

Comment thread cmd/plt_print_test.go
}
}

func TestRenderJSON_RoundTrips(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestRenderJSON_RoundTrips missing the call to method parallel (paralleltest)

Comment thread cmd/plt_print_test.go
}
}

func TestRenderText_ContainsKeyData(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestRenderText_ContainsKeyData missing the call to method parallel (paralleltest)

@statik statik left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

golangci

🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)

stmts = append(stmts, tables[name])


🚫 [golangci] reported by reviewdog 🐶
anonymous switch statements should never be cuddled (wsl)

switch {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i := range want {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = zr.Close() }()


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = rows.Close() }()


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

defer func() { _ = rc.Close() }()


🚫 [golangci] reported by reviewdog 🐶
ranges should only be cuddled with assignments used in the iteration (wsl)

for _, table := range requiredTables {


🚫 [golangci] reported by reviewdog 🐶
expressions should not be cuddled with blocks (wsl)

t.Cleanup(func() { _ = arc.Close() })


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i, it := range pl.Items {


🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

for i, want := range wantLabels {


🚫 [golangci] reported by reviewdog 🐶
expressions should not be cuddled with blocks (wsl)

t.Cleanup(func() { _ = arc.Close() })


🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (too many statements above range) (wsl_v5)

want := []string{"talk", "talk-2", "talk-3", "other"}


🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (invalid statement above assign) (wsl_v5)

err := db.QueryRow(`SELECT Name FROM Tag WHERE Type = 2`).Scan(&name)

Comment thread cmd/plt_parse_test.go
}
}

func TestParsePlaylist_BookChapterMarkers(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestParsePlaylist_BookChapterMarkers missing the call to method parallel (paralleltest)

Comment thread cmd/plt_sniff_test.go
"testing"
)

func TestSniffPlaylist_AcceptsValidRenamedFile(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_AcceptsValidRenamedFile missing the call to method parallel (paralleltest)

Comment thread cmd/plt_sniff_test.go
}
}

func TestSniffPlaylist_Rejections(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_Rejections missing the call to method parallel (paralleltest)

Comment thread cmd/plt_sniff_test.go
{"missing required table", fixtureOptions{omitTables: []string{"PlaylistItemMarker"}}, "PlaylistItemMarker"},
}

for _, tc := range cases {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Range statement for test TestSniffPlaylist_Rejections missing the call to method parallel in test Run (paralleltest)

Comment thread cmd/plt_sniff_test.go
}
}

func TestSniffPlaylist_UnverifiedSchemaProceeds(t *testing.T) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
Function TestSniffPlaylist_UnverifiedSchemaProceeds missing the call to method parallel (paralleltest)

Comment thread cmd/plt_parse.go

// verifyTables confirms every required table is present in the database.
func verifyTables(dbPath string) error {
db, err := sql.Open("sqlite", dbPath)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
variable name 'db' is too short for the scope of its usage (varnamelen)

Comment thread cmd/plt_parse_test.go
}

func TestParsePlaylist_NameAndOrder(t *testing.T) {
pl := parseFixture(t)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
variable name 'pl' is too short for the scope of its usage (varnamelen)

Comment thread cmd/plt.go
DurationSec: ticksToSeconds(m.DurationTicks),
})
}
view.Items = append(view.Items, pi)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)

Comment thread cmd/plt_fixture_test.go
t.Helper()

img := image.NewRGBA(image.Rect(0, 0, 1, 1))
var buf bytes.Buffer

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
declarations should never be cuddled (wsl)

Comment thread cmd/plt_fixture_test.go
}

var stmts []string
for _, name := range order {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
ranges should only be cuddled with assignments used in the iteration (wsl)

Comment thread cmd/plt.go
if it.IsImage() {
return ticksToSeconds(it.Image.DurationTicks)
}
if it.Location != nil {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

Comment thread cmd/plt_fixture_test.go
if omit[name] {
continue
}
stmts = append(stmts, tables[name])

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)

Comment thread cmd/plt_helpers.go

for _, r := range s {
r = unicode.ToLower(r)
switch {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
anonymous switch statements should never be cuddled (wsl)

Comment thread cmd/plt_helpers_test.go
uniqueSlug("other", seen),
}
want := []string{"talk", "talk-2", "talk-3", "other"}
for i := range want {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

Comment thread cmd/plt_parse.go
if err != nil {
return fmt.Errorf("could not open database: %w", err)
}
defer func() { _ = db.Close() }()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

Comment thread cmd/plt_parse_test.go
if len(pl.Items) != 4 {
t.Fatalf("len(Items) = %d, want 4", len(pl.Items))
}
for i, it := range pl.Items {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

Comment thread cmd/plt_parse_test.go
t.Fatalf("chapter markers = %d, want 3", len(chapter.Markers))
}
wantLabels := []string{"Marker one", "Marker two", "Marker three"}
for i, want := range wantLabels {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before range statement (wsl)

Comment thread cmd/plt_sniff_test.go
if err != nil {
t.Fatalf("unverified schema version should still parse, got: %v", err)
}
t.Cleanup(func() { _ = arc.Close() })

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
expressions should not be cuddled with blocks (wsl)

Comment thread cmd/plt_helpers_test.go
uniqueSlug("talk", seen),
uniqueSlug("other", seen),
}
want := []string{"talk", "talk-2", "talk-3", "other"}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (too many statements above range) (wsl_v5)

Comment thread cmd/plt_parse.go
// queryPlaylistName returns the name of the playlist tag (Type 2).
func queryPlaylistName(db *sql.DB) (string, error) {
var name string
err := db.QueryRow(`SELECT Name FROM Tag WHERE Type = 2`).Scan(&name)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
missing whitespace above this line (invalid statement above assign) (wsl_v5)

statik added 3 commits June 12, 2026 16:02
Parse purple playlist exports (ZIP + SQLite) and print their cues as a
table or JSON, fully offline. Includes a content-based format sniffer
that rejects invalid files with named reasons, a SQLite-to-domain parser
for the verified table contract, and a synthetic fixture generator so
tests never depend on real exports.

Promotes modernc.org/sqlite to a direct dependency (pure-Go driver,
no CGO) and adds a vendor-neutrality CI guard that rejects the
publisher's identifiers in authored files.
… run

Add an Examples section and a descriptive Use string so 'vbs plt --help'
makes clear each subcommand takes a playlist file. Resolve relative input
paths against BUILD_WORKING_DIRECTORY so 'bazel run' works from the
directory the user invoked it in, not the runfiles tree.
A missing or unreadable path now fails with "Could not open playlist file:
no such file" instead of the format-validation message, which was misleading
for a mistyped path. Extracted openPlaylist as the shared resolve-check-sniff
entry point for the print and build commands.
Comment thread cmd/plt_fixture_test.go
files := map[string][]byte{
dbName: dbBytes,
fixtureThumbA: onePixelJPEG(t),
fixtureThumbBook: onePixelJPEG(t),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
File is not properly formatted (gci)

Comment thread cmd/plt.go
} else {
err = renderText(os.Stdout, view)
}
if err != nil {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)

Comment thread cmd/plt_parse.go
if err != nil {
return fmt.Errorf("could not read embedded media: %w", err)
}
defer func() { _ = rows.Close() }()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

Comment thread cmd/plt_parse.go
if err != nil {
return fmt.Errorf("could not list database tables: %w", err)
}
defer func() { _ = rows.Close() }()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before defer statement (wsl)

@statik statik merged commit 1441cc8 into main Jun 12, 2026
13 checks passed
@statik statik deleted the plt-phase-1 branch June 12, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant