Files
zot/.golangci.yaml
Andrei Aaron a5cc8ab810 feat: support pushing multiple tags for a single manifest (#3885)
* feat: support pushing multiple tags for a single manifest

See https://github.com/opencontainers/distribution-spec/pull/600

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

* fix: constants not replaced in swagger output

Also godot mandates comments ending in dots,
which produces bad results in the swagger generated files, see the extra ". which is now fixed below:

```
diff --git a/swagger/docs.go b/swagger/docs.go
index 84b08277..fb2c45c3 100644
--- a/swagger/docs.go
+++ b/swagger/docs.go
@@ -114,7 +114,7 @@ const docTemplate = `{
                         }
                     },
                     "400": {
-                        "description": "bad request\".",
+                        "description": "bad request",
                         "schema": {
                             "type": "string"
                         }
@@ -200,7 +200,7 @@ const docTemplate = `{
                         }
                     },
                     "400": {
-                        "description": "bad request\".",
+                        "description": "bad request",
                         "schema": {
                             "type": "string"
                         }
diff --git a/swagger/swagger.json b/swagger/swagger.json
index cfeb3900..247f95fa 100644
--- a/swagger/swagger.json
+++ b/swagger/swagger.json
@@ -106,7 +106,7 @@
                         }
                     },
                     "400": {
-                        "description": "bad request\".",
+                        "description": "bad request",
                         "schema": {
                             "type": "string"
                         }
@@ -192,7 +192,7 @@
                         }
                     },
                     "400": {
-                        "description": "bad request\".",
+                        "description": "bad request",
                         "schema": {
                             "type": "string"
                         }
diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml
index 57641c2f..09b30dcc 100644
--- a/swagger/swagger.yaml
+++ b/swagger/swagger.yaml
@@ -310,7 +310,7 @@ paths:
           schema:
             type: string
         "400":
-          description: bad request".
+          description: bad request
           schema:
             type: string
         "500":
@@ -366,7 +366,7 @@ paths:
           schema:
             type: string
         "400":
-          description: bad request".
+          description: bad request
           schema:
             type: string
         "500":
```

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>

---------

Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
2026-03-29 21:13:24 +03:00

139 lines
2.5 KiB
YAML

version: "2"
linters:
default: all
disable:
- contextcheck
- copyloopvar
- depguard
- exhaustive
- exhaustruct
- forbidigo
- funcorder
- funlen
- gocognit
- gosmopolitan
- iface
- inamedparam
- intrange
- ireturn
- maintidx
- mnd
- musttag
- noinlineerr
- paralleltest
- promlinter
- protogetter
- recvcheck
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- usetesting
- wrapcheck
- wsl
settings:
cyclop:
max-complexity: 40
dupl:
threshold: 200
mnd:
checks:
- argument
- case
- condition
- operation
- return
- assign
ignored-numbers:
- "10"
- "64"
nestif:
min-complexity: 26
nolintlint:
allow-unused: true
varnamelen:
check-return: true
ignore-names:
- err
- ok
- gc
- wg
ignore-type-assert-ok: true
ignore-map-index-ok: true
ignore-chan-recv-ok: true
ignore-decls:
- n int
- i int
- r *os.File
- w *os.File
- to int64
- l *ldap.Conn
- w http.ResponseWriter
- r *http.Request
wsl_v5:
allow-first-in-block: true
allow-whole-block: false
branch-max-lines: 2
enable:
- err
disable:
- assign
- defer
- if
- send
- expr
- select
- switch
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- godot
path: pkg/api/routes.go
- linters:
- godot
path: pkg/extensions/extension_image_trust.go
- linters:
- godot
path: pkg/extensions/extension_mgmt.go
- linters:
- lll
- varnamelen
path: pkg/extensions/search/schema.resolvers.go
- linters:
- dupl
path: _test\.go
- linters:
- cyclop
path: (.+)_test\.go
paths:
- internal
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(zotregistry.dev/zot/v2)
exclusions:
generated: lax
paths:
- internal
- third_party$
- builtin$
- examples$
- pkg/extensions/search/schema.resolvers.go