Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ updates:
interval: "daily"
commit-message:
prefix: "go.mod:"

# Maintain dependencies for Go tools
- package-ecosystem: "gomod"
directory: "/tools"
schedule:
interval: "weekly"
commit-message:
prefix: "Go tools:"
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Golangci-lint version
id: golangci-lint-version
run: |
GOLANGCI_LINT_VERSION=$( go list -m -f '{{.Version}}' github.com/golangci/golangci-lint )
GOLANGCI_LINT_VERSION=$( go list -modfile=tools/go.mod -m -f '{{.Version}}' github.com/golangci/golangci-lint/v2 )
echo "v=$GOLANGCI_LINT_VERSION" >> "$GITHUB_OUTPUT"

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: ${{ steps.golangci-lint-version.outputs.v }}
118 changes: 44 additions & 74 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,72 @@
run:
timeout: 5m

linters-settings:
gofmt:
simplify: false
govet:
disable:
- shadow
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: true # require an explanation for nolint directives
require-specific: true # require nolint directives to mention the specific linter being suppressed
gocyclo:
min-complexity: 20
goconst:
ignore-tests: true
goheader:
template-path: '.golangci.goheader.template'
values:
regexp:
copyright-year: 20[2-9]\d

version: "2"
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
default: none
enable:
- bodyclose
- copyloopvar
# - depguard
- dogsled
- durationcheck
- errcheck
- errname
# - errorlint
# - exhaustive
# - exhaustivestruct
# - forbidigo
# - forcetypeassert
# - funlen
# - gochecknoinits
- goconst
- gocritic
- gocyclo
# - cyclop # not interested in package complexities at the moment
# - godot
- gofmt
# - gofumpt
- goheader
- goimports
- revive
# - gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
# - ifshort
- ineffassign
# - importas
# - lll
# - misspell
- makezero
# - nakedret
# - nilerr
# - nilnil
# - nlreturn
- noctx
- nolintlint
# - paralleltest
- predeclared
- revive
- rowserrcheck
- staticcheck
- stylecheck
- sqlclosecheck
# - tagliatelle
# - tenv
# - thelper
# - tparallel
- typecheck
- staticcheck
- unconvert
# - unparam
- unused
- wastedassign
- whitespace
# - wrapcheck
# - wsl

# don't enable:
# - asciicheck
# - dupl
# - gochecknoglobals
# - gocognit
# - godox
# - goerr113
# - maligned
# - nestif
# - prealloc
# - testpackage
# - wsl
settings:
gocyclo:
min-complexity: 20
goheader:
values:
regexp:
copyright-year: 20[2-9]\d
template-path: .golangci.goheader.template
nolintlint:
require-explanation: true
require-specific: true
allow-unused: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- goconst
path: (.+)_test\.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: false
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test:

.PHONY: lint
lint:
golangci-lint run -v
golangci-lint run

.PHONY: generate
generate:
Expand All @@ -19,8 +19,8 @@ generate:

.PHONY: install-tools
install-tools:
@echo Installing tools from tools.go
@go list -e -f '{{ join .Imports "\n" }}' tools.go | xargs -I % go list -f "%@{{.Module.Version}}" % | xargs -tI % go install %
@echo Installing tools from tools/go.mod
@go list -modfile=tools/go.mod tool | xargs -I % go list -modfile=tools/go.mod -f "%@{{.Module.Version}}" % | xargs -tI % go install %
@go mod tidy


Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
module github.com/conduitio/conduit-connector-file

go 1.23.2
go 1.24.2

require (
github.com/conduitio/conduit-commons v0.5.2
github.com/conduitio/conduit-connector-sdk v0.13.3
github.com/golangci/golangci-lint v1.64.8
github.com/nxadm/tail v1.4.11
go.uber.org/goleak v1.3.0
mvdan.cc/gofumpt v0.7.0
)

require (
Expand Down Expand Up @@ -81,6 +79,7 @@ require (
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
github.com/golangci/go-printf-func-name v0.1.0 // indirect
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
github.com/golangci/golangci-lint v1.64.8 // indirect
github.com/golangci/misspell v0.6.0 // indirect
github.com/golangci/plugin-module-register v0.1.1 // indirect
github.com/golangci/revgrep v0.8.0 // indirect
Expand Down Expand Up @@ -231,5 +230,6 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.6.1 // indirect
mvdan.cc/gofumpt v0.7.0 // indirect
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect
)
23 changes: 0 additions & 23 deletions tools.go

This file was deleted.

Loading