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