Skip to content

Commit

Permalink
Update dependencies, and golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
neilotoole committed Jan 5, 2025
1 parent 9dc178a commit e649022
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 72 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ on:
workflow_dispatch:

env:
GO_VERSION: 1.23.3
GORELEASER_VERSION: 1.24.0
GOLANGCI_LINT_VERSION: v1.62.0
GOLANGCI_LINT_VERSION: v1.63.4
TPARSE_VERSION: v0.13.2
BUILD_TAGS: 'sqlite_vtable sqlite_stat4 sqlite_fts5 sqlite_introspect sqlite_json sqlite_math_functions'

Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ linters-settings:
# Checks the number of lines in a function.
# If lower than 0, disable the check.
# Default: 60
lines: 150
lines: 175
# Checks the number of statements in a function.
# If lower than 0, disable the check.
# Default: 40
Expand Down Expand Up @@ -496,14 +496,14 @@ linters:
- asciicheck # checks that your code does not contain non-ASCII identifiers
- bidichk # checks for dangerous unicode character sequences
- bodyclose # checks whether HTTP response body is closed successfully
# - copyloopvar # detects places where loop variables are copied.
- cyclop # checks function and package cyclomatic complexity
- dupl # tool for code clone detection
- durationcheck # checks for two durations multiplied together
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
# - execinquery # checks query string in Query function which reads your Go src files and warning it finds (linter archived)
- exhaustive # checks exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
- forbidigo # forbids identifiers
- funlen # tool for detection of long functions
- gocheckcompilerdirectives
Expand Down
4 changes: 2 additions & 2 deletions drivers/mysql/db_type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

// typeTestTableDDLPath is the location of the SQL CREATE statement
// for the "type_test" table that is used to verify handling of the
// the driver's various data types.
// driver's various data types.
const typeTestTableDDLPath = "testdata/type_test.ddl"

// typeTestVals is the set of vals inserted to the type_test table (and
Expand Down Expand Up @@ -223,7 +223,7 @@ var typeTestVals = [][]any{
}

// typeTestColNames holds type_test table column names.
// TODO: add spatial types
// TODO: add spatial types.
var typeTestColNames = []string{
"col_id",
"col_bigint",
Expand Down
12 changes: 7 additions & 5 deletions drivers/sqlite3/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ func setScanType(ctx context.Context, colType *record.ColumnTypeData) {

// kindFromDBTypeName determines the kind.Kind from the database
// type name. For example, "VARCHAR(64)" -> kind.Text.
// See https://www.sqlite.org/datatype3.html#determination_of_column_affinity
// The scanType arg may be nil (it may not be available to the caller): when
// non-nil it may be used to determine ambiguous cases. For example,
// dbTypeName is empty string for "COUNT(*)"
//
// See: https://www.sqlite.org/datatype3.html#determination_of_column_affinity
//
// The scanType arg may be nil (it may not be available to the caller). When
// non-nil it may be used to determine ambiguous cases. For example, dbTypeName
// is empty string for "COUNT(*)".
func kindFromDBTypeName(ctx context.Context, colName, dbTypeName string, scanType reflect.Type) kind.Kind {
log := lg.FromContext(ctx)
if dbTypeName == "" {
Expand Down Expand Up @@ -236,7 +238,7 @@ func kindFromDBTypeName(ctx context.Context, colName, dbTypeName string, scanTyp
}

// DBTypeForKind returns the database type for kind.
// For example: Int --> INTEGER
// For example: Int --> INTEGER.
func DBTypeForKind(knd kind.Kind) string {
switch knd {
default:
Expand Down
35 changes: 18 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/neilotoole/sq

go 1.23.3
go 1.23.0

require (
github.com/Masterminds/sprig/v3 v3.3.0
Expand All @@ -14,15 +14,15 @@ require (
github.com/emirpasic/gods v1.18.1
github.com/fatih/color v1.18.0
github.com/go-sql-driver/mysql v1.8.1
github.com/goccy/go-yaml v1.14.3
github.com/goccy/go-yaml v1.15.13
github.com/google/renameio/v2 v2.0.0
github.com/google/uuid v1.6.0
github.com/h2non/filetype v1.1.3
github.com/jackc/pgx/v5 v5.7.1
github.com/jackc/pgx/v5 v5.7.2
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-runewidth v0.0.16
github.com/mattn/go-sqlite3 v1.14.24
github.com/microsoft/go-mssqldb v1.7.2
github.com/microsoft/go-mssqldb v1.8.0
github.com/mitchellh/go-wordwrap v1.0.1
github.com/muesli/mango-cobra v1.2.0
github.com/muesli/roff v0.1.0
Expand All @@ -33,7 +33,7 @@ require (
github.com/neilotoole/streamcache v0.3.5
github.com/neilotoole/tailbuf v0.0.4
github.com/nightlyone/lockfile v1.0.0
github.com/otiai10/copy v1.14.0
github.com/otiai10/copy v1.14.1
github.com/pkg/profile v1.7.0
github.com/ryboe/q v1.0.23
github.com/samber/lo v1.47.0
Expand All @@ -47,18 +47,18 @@ require (
github.com/xo/dburl v0.23.2
github.com/xuri/excelize/v2 v2.8.1
go.uber.org/atomic v1.11.0
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f
golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329
golang.org/x/mod v0.22.0
golang.org/x/sync v0.9.0
golang.org/x/sys v0.27.0
golang.org/x/term v0.26.0
golang.org/x/text v0.20.0
golang.org/x/sync v0.10.0
golang.org/x/sys v0.29.0
golang.org/x/term v0.28.0
golang.org/x/text v0.21.0
)

require (
dario.cat/mergo v1.0.1 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.1 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
Expand All @@ -67,7 +67,7 @@ require (
github.com/felixge/fgprof v0.9.5 // indirect
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/google/pprof v0.0.0-20241122213907-cbe949e5a41b // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
Expand All @@ -78,21 +78,22 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/muesli/mango v0.2.0 // indirect
github.com/muesli/mango-pflag v0.1.0 // indirect
github.com/neilotoole/fifomu v0.1.2 // indirect
github.com/otiai10/mint v1.6.3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/xuri/efp v0.0.0-20241211021726-c4e992084aa6 // indirect
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit e649022

Please sign in to comment.