chore: configure strict golangci-lint
This commit is contained in:
@@ -1,41 +1,54 @@
|
||||
run:
|
||||
timeout: 5m
|
||||
|
||||
output:
|
||||
sort-results: true
|
||||
version: '2'
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
default: none
|
||||
enable:
|
||||
- copyloopvar
|
||||
- errcheck
|
||||
- exportloopref
|
||||
- govet
|
||||
- ineffassign
|
||||
- revive
|
||||
- staticcheck
|
||||
- typecheck
|
||||
- unconvert
|
||||
- unused
|
||||
|
||||
linters-settings:
|
||||
revive:
|
||||
rules:
|
||||
- name: blank-imports
|
||||
- name: context-as-argument
|
||||
- name: context-keys-type
|
||||
- name: early-return
|
||||
- name: error-naming
|
||||
- name: error-return
|
||||
- name: exported
|
||||
- name: if-return
|
||||
- name: increment-decrement
|
||||
- name: range
|
||||
- name: receiver-naming
|
||||
- name: time-naming
|
||||
- name: unexported-return
|
||||
- name: unnecessary-stmt
|
||||
- name: var-declaration
|
||||
settings:
|
||||
revive:
|
||||
enable-all-rules: false
|
||||
rules:
|
||||
- name: blank-imports
|
||||
- name: context-as-argument
|
||||
- name: context-keys-type
|
||||
- name: early-return
|
||||
- name: error-naming
|
||||
- name: error-return
|
||||
- name: if-return
|
||||
- name: increment-decrement
|
||||
- name: range
|
||||
- name: receiver-naming
|
||||
- name: time-naming
|
||||
- name: unnecessary-stmt
|
||||
- name: var-declaration
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
- node_modules$
|
||||
|
||||
issues:
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
|
||||
formatters:
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
|
||||
2
justfile
2
justfile
@@ -7,7 +7,7 @@ fmt:
|
||||
go fmt ./...
|
||||
|
||||
lint:
|
||||
golangci-lint run
|
||||
bun run lint:go
|
||||
|
||||
lint-ts:
|
||||
bun run lint:ts
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
'commands':
|
||||
{
|
||||
'go-fmt': { 'run': 'go fmt ./...' },
|
||||
'go-lint': { 'run': 'golangci-lint run' },
|
||||
'go-lint': { 'run': 'bun run lint:go' },
|
||||
'go-test': { 'run': 'go test ./...' },
|
||||
'ts-typecheck': { 'run': 'bunx tsc -p tsconfig.json --noEmit' },
|
||||
'build-assets': { 'run': 'bun run build:assets' },
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"lint": "bun run lint:ts && bun run lint:go",
|
||||
"lint:ts": "bunx eslint . --max-warnings 0",
|
||||
"lint:ts:fix": "bunx eslint . --fix",
|
||||
"lint:go": "golangci-lint run"
|
||||
"lint:go": "mkdir -p .cache/golangci-lint .cache/go-build && GOCACHE=$(pwd)/.cache/go-build GOLANGCI_LINT_CACHE=$(pwd)/.cache/golangci-lint golangci-lint run ./cmd/... && GOCACHE=$(pwd)/.cache/go-build GOLANGCI_LINT_CACHE=$(pwd)/.cache/golangci-lint golangci-lint run ./internal/... && GOCACHE=$(pwd)/.cache/go-build GOLANGCI_LINT_CACHE=$(pwd)/.cache/golangci-lint golangci-lint run ./pkg/... && GOCACHE=$(pwd)/.cache/go-build GOLANGCI_LINT_CACHE=$(pwd)/.cache/golangci-lint golangci-lint run ./integrations/..."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/cli": "^4.2.4",
|
||||
|
||||
Reference in New Issue
Block a user