Skip to content

Commit 9d6d793

Browse files
authored
docs: fix default value for sloglint no-global (#4547)
1 parent 062d985 commit 9d6d793

4 files changed

+18
-10
lines changed

.golangci.next.reference.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -2002,12 +2002,16 @@ linters-settings:
20022002
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
20032003
# Default: false
20042004
kv-only: true
2005-
# Enforce not using global loggers.
2006-
# Default: default
2007-
no-global: all
20082005
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
20092006
# Default: false
20102007
attr-only: true
2008+
# Enforce not using global loggers.
2009+
# Values:
2010+
# - "": disabled
2011+
# - "all": report all global loggers
2012+
# - "default": report only the default slog logger
2013+
# Default: ""
2014+
no-global: "all"
20112015
# Enforce using methods that accept a context.
20122016
# Default: false
20132017
context-only: true

.golangci.reference.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -2002,12 +2002,16 @@ linters-settings:
20022002
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
20032003
# Default: false
20042004
kv-only: true
2005-
# Enforce not using global loggers.
2006-
# Default: default
2007-
no-global: all
20082005
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
20092006
# Default: false
20102007
attr-only: true
2008+
# Enforce not using global loggers.
2009+
# Values:
2010+
# - "": disabled
2011+
# - "all": report all global loggers
2012+
# - "default": report only the default slog logger
2013+
# Default: ""
2014+
no-global: "all"
20112015
# Enforce using methods that accept a context.
20122016
# Default: false
20132017
context-only: true

jsonschema/golangci.jsonschema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2317,8 +2317,8 @@
23172317
},
23182318
"no-global": {
23192319
"description": "Enforce not using global loggers.",
2320-
"enum": ["all", "default"],
2321-
"default": "default"
2320+
"enum": ["", "all", "default"],
2321+
"default": ""
23222322
},
23232323
"no-mixed-args": {
23242324
"description": "Enforce not mixing key-value pairs and attributes.",

jsonschema/golangci.next.jsonschema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2317,8 +2317,8 @@
23172317
},
23182318
"no-global": {
23192319
"description": "Enforce not using global loggers.",
2320-
"enum": ["all", "default"],
2321-
"default": "default"
2320+
"enum": ["", "all", "default"],
2321+
"default": ""
23222322
},
23232323
"no-mixed-args": {
23242324
"description": "Enforce not mixing key-value pairs and attributes.",

0 commit comments

Comments
 (0)