From fab861faa3c38f66ceb2e6f018411e45836d86a7 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Mon, 4 Dec 2023 11:39:04 +0200 Subject: [PATCH] chore(deps): Update dependency golangci/golangci-lint to v1.55.2 (#358) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [golangci/golangci-lint](https://togithub.com/golangci/golangci-lint) | minor | `v1.54.2` -> `v1.55.2` | --- ### ⚠ Dependency Lookup Warnings ⚠ Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information. --- ### Release Notes
golangci/golangci-lint (golangci/golangci-lint) ### [`v1.55.2`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1552) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.1...v1.55.2) 1. updated linters - `ireturn`: from 0.2.1 to 0.2.2 - `ginkgolinter`: from 0.14.0 to 0.14.1 ### [`v1.55.1`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1551) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.55.0...v1.55.1) 1. updated linters - `gosec`: from 2.18.1 to 2.18.2 2. misc. - `revgrep`: from v0.5.0 to v0.5.2 (support git < 2.41.0) - output: convert backslashes to forward slashes for GitHub Action annotations printer ### [`v1.55.0`](https://togithub.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1550) [Compare Source](https://togithub.com/golangci/golangci-lint/compare/v1.54.2...v1.55.0) 1. new linters - `gochecksumtype`: https://github.com/alecthomas/go-check-sumtype - `inamedparam`: https://github.com/macabu/inamedparam - `perfsprint`: https://github.com/catenacyber/perfsprint - `protogetter`: https://github.com/ghostiam/protogetter - `sloglint`: https://github.com/go-simpler/sloglint - `testifylint`: https://github.com/Antonboom/testifylint 2. updated linters - `bidichk`: from 0.2.4 to 0.2.7 - `decorder`: from 0.4.0 to 0.4.1 - `dupword`: from 0.0.12 to 0.0.13 - `errchkjson`: from 0.3.1 to 0.3.6 - `gci`: from 0.11.0 to 0.11.2 - `ginkgolinter`: from 0.13.5 to 0.14.0 - `go-errorlint`: from 1.4.4 to 1.4.5 - `gocognit`: from 1.0.7 to 1.1.0 - `goconst`: from 1.5.1 to 1.6.0 - `godot`: from 1.4.14 to 1.4.15 - `gofmt`: update to HEAD - `goimports`: update to HEAD - `gosec`: from 2.17.0 to 2.18.1 - `gosmopolitan`: from 1.2.1 to 1.2.2 - `govet`: add `appends` analyzer - `ireturn`: from 0.2.0 to 0.2.1 - `protogetter`: from 0.2.2 to 0.2.3 - `revgrep`: from [`745bb2f`](https://togithub.com/golangci/golangci-lint/commit/745bb2f7c2e6) to v0.5.0 - `revive`: from 1.3.2 to 1.3.4 - `sqlclosecheck`: from 0.4.0 to 0.5.1 - `staticcheck`: from 0.4.5 to 0.4.6 - `tagalign`: from 1.3.2 to 1.3.3 - `unused`: support passing in options 3. misc. - Add a pre-commit hook to check all files 4. Documentation - add source options to exclude-rules docs - `gosec`: add G602 to includes/excludes inside .golangci.reference.yml
--- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). --- .github/workflows/lint_golang.yml | 2 +- .golangci.yml | 11 ++++++----- client.go | 18 +++++++++--------- spec.go | 8 ++++---- stream_test.go | 2 +- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index ded602e0..6c8dbb79 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -19,5 +19,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.54.2 + version: v1.55.2 args: --verbose diff --git a/.golangci.yml b/.golangci.yml index 816724f4..6104af9b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -51,14 +51,15 @@ linters-settings: disabled: true - name: nested-structs disabled: true + - name: unchecked-type-assertion + disabled: true gofmt: rewrite-rules: - - pattern: 'interface{}' - replacement: 'any' - - pattern: 'a[b:len(a)]' - replacement: 'a[b:]' - + - pattern: "interface{}" + replacement: "any" + - pattern: "a[b:len(a)]" + replacement: "a[b:]" linters: enable: diff --git a/client.go b/client.go index f0902f97..cb2bffe0 100644 --- a/client.go +++ b/client.go @@ -1,8 +1,8 @@ package filetypes import ( - csvFile "github.com/cloudquery/filetypes/v4/csv" - jsonFile "github.com/cloudquery/filetypes/v4/json" + csvfile "github.com/cloudquery/filetypes/v4/csv" + jsonfile "github.com/cloudquery/filetypes/v4/json" "github.com/cloudquery/filetypes/v4/parquet" "github.com/cloudquery/filetypes/v4/types" ) @@ -14,8 +14,8 @@ type Client struct { var ( _ types.FileType = (*Client)(nil) - _ types.FileType = (*csvFile.Client)(nil) - _ types.FileType = (*jsonFile.Client)(nil) + _ types.FileType = (*csvfile.Client)(nil) + _ types.FileType = (*jsonfile.Client)(nil) _ types.FileType = (*parquet.Client)(nil) ) @@ -34,17 +34,17 @@ func NewClient(spec *FileSpec) (*Client, error) { var client types.FileType switch spec.Format { case FormatTypeCSV: - opts := []csvFile.Options{ - csvFile.WithDelimiter([]rune(spec.csvSpec.Delimiter)[0]), + opts := []csvfile.Options{ + csvfile.WithDelimiter([]rune(spec.csvSpec.Delimiter)[0]), } if !spec.csvSpec.SkipHeader { - opts = append(opts, csvFile.WithHeader()) + opts = append(opts, csvfile.WithHeader()) } - client, err = csvFile.NewClient(opts...) + client, err = csvfile.NewClient(opts...) case FormatTypeJSON: - client, err = jsonFile.NewClient() + client, err = jsonfile.NewClient() case FormatTypeParquet: client, err = parquet.NewClient(parquet.WithSpec(*spec.parquetSpec)) diff --git a/spec.go b/spec.go index 98e36311..a2468c2e 100644 --- a/spec.go +++ b/spec.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/cloudquery/filetypes/v4/csv" - jsonFile "github.com/cloudquery/filetypes/v4/json" + jsonfile "github.com/cloudquery/filetypes/v4/json" "github.com/cloudquery/filetypes/v4/parquet" "github.com/invopop/jsonschema" orderedmap "github.com/wk8/go-ordered-map/v2" @@ -40,7 +40,7 @@ type FileSpec struct { Compression CompressionType `json:"compression,omitempty" jsonschema:"enum=,enum=gzip"` csvSpec *csv.Spec - jsonSpec *jsonFile.Spec + jsonSpec *jsonfile.Spec parquetSpec *parquet.Spec } @@ -48,7 +48,7 @@ func (FileSpec) JSONSchemaExtend(sc *jsonschema.Schema) { sc.ID = "/schemas/FileSpec" sc.Definitions = jsonschema.Definitions{ "CSVSpec": csv.Spec{}.JSONSchema(), - "JSONSpec": jsonFile.Spec{}.JSONSchema(), + "JSONSpec": jsonfile.Spec{}.JSONSchema(), "ParquetSpec": parquet.Spec{}.JSONSchema(), } @@ -160,7 +160,7 @@ func (s *FileSpec) UnmarshalSpec() error { s.csvSpec = &csv.Spec{} return dec.Decode(s.csvSpec) case FormatTypeJSON: - s.jsonSpec = &jsonFile.Spec{} + s.jsonSpec = &jsonfile.Spec{} return dec.Decode(s.jsonSpec) case FormatTypeParquet: s.parquetSpec = &parquet.Spec{} diff --git a/stream_test.go b/stream_test.go index 07508fb4..ddaa222d 100644 --- a/stream_test.go +++ b/stream_test.go @@ -2,7 +2,7 @@ package filetypes_test import ( "bufio" - fmt "fmt" + "fmt" "io" "testing"