Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more type of headers #13

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 6 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
with:
version: v1.40
version: v1.59
test:
strategy:
matrix:
go-version: [1.16.x]
go-version: [1.21.x, 1.22.x]
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Go install
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
Expand Down
119 changes: 65 additions & 54 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,55 @@
run:
modules-download-mode: readonly # Do not update dependencies.

modules-download-mode: mod
linters-settings:
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks:
- argument
- case
- condition
- return
lll:
line-length: 160
maligned:
suggest-new: true
misspell:
locale: US
staticcheck:
go: "1.16"
gosimple:
go: "1.16"
stylecheck:
go: "1.16"
unused:
go: "1.16"
varnamelen:
min-name-length: 2
tagliatelle:
case:
rules:
json: snake
funlen:
lines: 100
cyclop:
max-complexity: 15

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
enable:
# Default linters
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
# Additional linters
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- depguard
- decorder
# - depguard # ? is not allowed from list 'Main' - maybe bug. Check later
- dogsled
- dupl
- dupword
- durationcheck
- errchkjson
- errname
- errorlint
# - execinquery # Linter has been archived by his owner.
- exhaustive
# - exhaustivestruct
# - exhaustruct
- exportloopref
- forbidigo
- forcetypeassert
- funlen
- gci
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- gocognit
Expand All @@ -75,50 +58,78 @@ linters:
- gocyclo
- godot
- godox
- goerr113
# - goerr113 # This service is small, do not force static errors
- gofmt
- gofumpt
- goheader # Configure it
- goheader
- goimports
- gomnd
# - gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- importas
- interfacebloat
# - ireturn # Does not support generics, see https://github.com/butuzov/ireturn/issues/39.
- lll
- loggercheck
- maintidx
- makezero
- misspell
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
# - nolintlint # Let's keed nolintlint if we decide to add it.
# - nonamedreturns # This linter does not make any sense.
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- stylecheck
- tagliatelle
- tenv
- testableexamples
- testpackage
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- varnamelen
- wastedassign
- whitespace
- wrapcheck
# - wrapcheck # It's not required in our app.
- wsl

- zerologlint
- gosmopolitan
- mirror
- tagalign
- gochecksumtype
- inamedparam
- perfsprint
# - protogetter
- sloglint
- spancheck
- copyloopvar
- intrange
issues:
exclude-rules:
- path: _test\.go
linters:
- gocyclo
- funlen
- goerr113
exclude-rules:
- path: _test\.go
linters:
- dupl
- exhaustivestruct
- funlen
- dupword
- lll
- path: doc\.go
linters:
- lll
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/aohorodnyk/mimeheader

go 1.16
go 1.21
Loading