From 3d69c8607e8480d87bd0c89ccc3f97f79104d8fe Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 17 Aug 2025 12:26:44 +0800 Subject: [PATCH] Fix some imports --- forged/.golangci.yaml | 76 +++++++++++++++++++++++++++--------------------------- forged/internal/common/bare/reader.go | 2 +- forged/internal/common/bare/writer.go | 2 +- forged/internal/ipc/git2c/client.go | 2 +- diff --git a/forged/.golangci.yaml b/forged/.golangci.yaml index 7bd6ec10537a0392af25dd5e67cf633a121a3e80..e475c41fb3d27f98813a81ace2558839367e02e2 100644 --- a/forged/.golangci.yaml +++ b/forged/.golangci.yaml @@ -2,41 +2,41 @@ version: "2" linters: default: all -# disable: -# - depguard -# - err113 # dynamically defined errors are fine for our purposes -# - forcetypeassert # type assertion failures are usually programming errors -# - gochecknoinits # we use inits sparingly for good reasons -# - godox # they're just used as markers for where needs improvements -# - ireturn # doesn't work well with how we use generics -# - lll # long lines are acceptable -# - mnd # it's a bit ridiculous to replace all of them -# - nakedret # patterns should be consistent -# - nonamedreturns # i like named returns -# - wrapcheck # wrapping all errors is just not necessary -# - varnamelen # "from" and "to" are very valid -# - containedctx -# - godot -# - dogsled -# - maintidx # e -# - nestif # e -# - gocognit # e -# - gocyclo # e -# - dupl # e -# - cyclop # e -# - goconst # e -# - funlen # e -# - wsl # e -# - nlreturn # e -# - unused # e -# - exhaustruct # e -# -# linters-settings: -# revive: -# rules: -# - name: error-strings -# disabled: true -# -# issues: -# max-issues-per-linter: 0 -# max-same-issues: 0 + disable: + - depguard + - err113 # dynamically defined errors are fine for our purposes + - forcetypeassert # type assertion failures are usually programming errors + - gochecknoinits # we use inits sparingly for good reasons + - godox # they're just used as markers for where needs improvements + - ireturn # doesn't work well with how we use generics + - lll # long lines are acceptable + - mnd # it's a bit ridiculous to replace all of them + - nakedret # patterns should be consistent + - nonamedreturns # i like named returns + - wrapcheck # wrapping all errors is just not necessary + - varnamelen # "from" and "to" are very valid + - containedctx + - godot + - dogsled + - maintidx # e + - nestif # e + - gocognit # e + - gocyclo # e + - dupl # e + - cyclop # e + - goconst # e + - funlen # e + - wsl # e + - nlreturn # e + - unused # e + - exhaustruct # e + +linters-settings: + revive: + rules: + - name: error-strings + disabled: true + +issues: + max-issues-per-linter: 0 + max-same-issues: 0 diff --git a/forged/internal/common/bare/reader.go b/forged/internal/common/bare/reader.go index 58325e30cc9b989581d46c2fa659ee141527f251..028a7aa68bbf5da0dc90e5e3780cc1b83ded8acc 100644 --- a/forged/internal/common/bare/reader.go +++ b/forged/internal/common/bare/reader.go @@ -10,7 +10,7 @@ "io" "math" "unicode/utf8" - "go.lindenii.runxiyu.org/forge/forged/internal/misc" + "go.lindenii.runxiyu.org/forge/forged/internal/common/misc" ) type byteReader interface { diff --git a/forged/internal/common/bare/writer.go b/forged/internal/common/bare/writer.go index bada0456e788a832eba53ed9d9b59bd1419b2dee..80cd7e26959d932e29b6453020389916ac02490b 100644 --- a/forged/internal/common/bare/writer.go +++ b/forged/internal/common/bare/writer.go @@ -9,7 +9,7 @@ "fmt" "io" "math" - "go.lindenii.runxiyu.org/forge/forged/internal/misc" + "go.lindenii.runxiyu.org/forge/forged/internal/common/misc" ) // A Writer for BARE primitive types. diff --git a/forged/internal/ipc/git2c/client.go b/forged/internal/ipc/git2c/client.go index d8dc2eaf28af138bb9c4d0723dd998fea05cbbe7..9f1b55c26d963a3335a3819470510f466e57cce2 100644 --- a/forged/internal/ipc/git2c/client.go +++ b/forged/internal/ipc/git2c/client.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "go.lindenii.runxiyu.org/forge/forged/internal/bare" + "go.lindenii.runxiyu.org/forge/forged/internal/common/bare" ) // Client represents a connection to the git2d backend daemon. -- 2.48.1