mirror of
https://github.com/juanfont/headscale.git
synced 2025-04-25 12:53:05 -04:00
flake: add golang-lint lsp (#2507)
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
3287aa8bba
commit
c30e3a4762
131
.golangci.yaml
131
.golangci.yaml
@ -1,74 +1,79 @@
|
|||||||
---
|
---
|
||||||
run:
|
version: "2"
|
||||||
timeout: 10m
|
|
||||||
build-tags:
|
|
||||||
- ts2019
|
|
||||||
|
|
||||||
issues:
|
|
||||||
skip-dirs:
|
|
||||||
- gen
|
|
||||||
linters:
|
linters:
|
||||||
enable-all: true
|
default: all
|
||||||
disable:
|
disable:
|
||||||
- revive
|
- cyclop
|
||||||
- lll
|
- depguard
|
||||||
- gofmt
|
- dupl
|
||||||
|
- exhaustruct
|
||||||
|
- funlen
|
||||||
- gochecknoglobals
|
- gochecknoglobals
|
||||||
- gochecknoinits
|
- gochecknoinits
|
||||||
- gocognit
|
- gocognit
|
||||||
- funlen
|
|
||||||
- tagliatelle
|
|
||||||
- godox
|
- godox
|
||||||
- ireturn
|
|
||||||
- execinquery
|
|
||||||
- exhaustruct
|
|
||||||
- nolintlint
|
|
||||||
- musttag # causes issues with imported libs
|
|
||||||
- depguard
|
|
||||||
- exportloopref
|
|
||||||
- tenv
|
|
||||||
|
|
||||||
# We should strive to enable these:
|
|
||||||
- wrapcheck
|
|
||||||
- dupl
|
|
||||||
- makezero
|
|
||||||
- maintidx
|
|
||||||
|
|
||||||
# Limits the methods of an interface to 10. We have more in integration tests
|
|
||||||
- interfacebloat
|
- interfacebloat
|
||||||
|
- ireturn
|
||||||
# We might want to enable this, but it might be a lot of work
|
- lll
|
||||||
- cyclop
|
- maintidx
|
||||||
|
- makezero
|
||||||
|
- musttag
|
||||||
- nestif
|
- nestif
|
||||||
- wsl # might be incompatible with gofumpt
|
- nolintlint
|
||||||
- testpackage
|
|
||||||
- paralleltest
|
- paralleltest
|
||||||
|
- revive
|
||||||
|
- tagliatelle
|
||||||
|
- testpackage
|
||||||
|
- wrapcheck
|
||||||
|
- wsl
|
||||||
|
settings:
|
||||||
|
gocritic:
|
||||||
|
disabled-checks:
|
||||||
|
- appendAssign
|
||||||
|
- ifElseChain
|
||||||
|
nlreturn:
|
||||||
|
block-size: 4
|
||||||
|
varnamelen:
|
||||||
|
ignore-names:
|
||||||
|
- err
|
||||||
|
- db
|
||||||
|
- id
|
||||||
|
- ip
|
||||||
|
- ok
|
||||||
|
- c
|
||||||
|
- tt
|
||||||
|
- tx
|
||||||
|
- rx
|
||||||
|
- sb
|
||||||
|
- wg
|
||||||
|
- pr
|
||||||
|
- p
|
||||||
|
- p2
|
||||||
|
ignore-type-assert-ok: true
|
||||||
|
ignore-map-index-ok: true
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
- gen
|
||||||
|
|
||||||
linters-settings:
|
formatters:
|
||||||
varnamelen:
|
enable:
|
||||||
ignore-type-assert-ok: true
|
- gci
|
||||||
ignore-map-index-ok: true
|
- gofmt
|
||||||
ignore-names:
|
- gofumpt
|
||||||
- err
|
- goimports
|
||||||
- db
|
exclusions:
|
||||||
- id
|
generated: lax
|
||||||
- ip
|
paths:
|
||||||
- ok
|
- third_party$
|
||||||
- c
|
- builtin$
|
||||||
- tt
|
- examples$
|
||||||
- tx
|
- gen
|
||||||
- rx
|
|
||||||
- sb
|
|
||||||
- wg
|
|
||||||
- pr
|
|
||||||
- p
|
|
||||||
- p2
|
|
||||||
|
|
||||||
gocritic:
|
|
||||||
disabled-checks:
|
|
||||||
- appendAssign
|
|
||||||
# TODO(kradalby): Remove this
|
|
||||||
- ifElseChain
|
|
||||||
|
|
||||||
nlreturn:
|
|
||||||
block-size: 4
|
|
||||||
|
6
flake.lock
generated
6
flake.lock
generated
@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743076231,
|
"lastModified": 1744536153,
|
||||||
"narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=",
|
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6c5963357f3c1c840201eda129a99d455074db04",
|
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -81,6 +81,9 @@
|
|||||||
# golangci-lint = prev.golangci-lint.override {
|
# golangci-lint = prev.golangci-lint.override {
|
||||||
# buildGoModule = buildGo;
|
# buildGoModule = buildGo;
|
||||||
# };
|
# };
|
||||||
|
# golangci-lint-langserver = prev.golangci-lint.override {
|
||||||
|
# buildGoModule = buildGo;
|
||||||
|
# };
|
||||||
|
|
||||||
goreleaser = prev.goreleaser.override {
|
goreleaser = prev.goreleaser.override {
|
||||||
buildGoModule = buildGo;
|
buildGoModule = buildGo;
|
||||||
@ -114,6 +117,7 @@
|
|||||||
buildDeps
|
buildDeps
|
||||||
++ [
|
++ [
|
||||||
golangci-lint
|
golangci-lint
|
||||||
|
golangci-lint-langserver
|
||||||
golines
|
golines
|
||||||
nodePackages.prettier
|
nodePackages.prettier
|
||||||
goreleaser
|
goreleaser
|
||||||
|
Loading…
x
Reference in New Issue
Block a user