Skip to content

Commit

Permalink
chore(deps): Update dependency golangci/golangci-lint to v1.55.2 (#358)
Browse files Browse the repository at this point in the history
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

<details>
<summary>golangci/golangci-lint (golangci/golangci-lint)</summary>

### [`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

</details>

---

### 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.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
  • Loading branch information
cq-bot authored Dec 4, 2023
1 parent c6eac29 commit fab861f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint_golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 6 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions client.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand All @@ -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)
)

Expand All @@ -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))
Expand Down
8 changes: 4 additions & 4 deletions spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -40,15 +40,15 @@ type FileSpec struct {
Compression CompressionType `json:"compression,omitempty" jsonschema:"enum=,enum=gzip"`

csvSpec *csv.Spec
jsonSpec *jsonFile.Spec
jsonSpec *jsonfile.Spec
parquetSpec *parquet.Spec
}

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(),
}

Expand Down Expand Up @@ -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{}
Expand Down
2 changes: 1 addition & 1 deletion stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package filetypes_test

import (
"bufio"
fmt "fmt"
"fmt"
"io"
"testing"

Expand Down

0 comments on commit fab861f

Please sign in to comment.