Skip to content

Commit

Permalink
docs: fix default value for sloglint no-global (#4547)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmzane authored Mar 20, 2024
1 parent 062d985 commit 9d6d793
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2002,12 +2002,16 @@ linters-settings:
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
# Default: false
kv-only: true
# Enforce not using global loggers.
# Default: default
no-global: all
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
# Default: false
attr-only: true
# Enforce not using global loggers.
# Values:
# - "": disabled
# - "all": report all global loggers
# - "default": report only the default slog logger
# Default: ""
no-global: "all"
# Enforce using methods that accept a context.
# Default: false
context-only: true
Expand Down
10 changes: 7 additions & 3 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2002,12 +2002,16 @@ linters-settings:
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
# Default: false
kv-only: true
# Enforce not using global loggers.
# Default: default
no-global: all
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
# Default: false
attr-only: true
# Enforce not using global loggers.
# Values:
# - "": disabled
# - "all": report all global loggers
# - "default": report only the default slog logger
# Default: ""
no-global: "all"
# Enforce using methods that accept a context.
# Default: false
context-only: true
Expand Down
4 changes: 2 additions & 2 deletions jsonschema/golangci.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2317,8 +2317,8 @@
},
"no-global": {
"description": "Enforce not using global loggers.",
"enum": ["all", "default"],
"default": "default"
"enum": ["", "all", "default"],
"default": ""
},
"no-mixed-args": {
"description": "Enforce not mixing key-value pairs and attributes.",
Expand Down
4 changes: 2 additions & 2 deletions jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2317,8 +2317,8 @@
},
"no-global": {
"description": "Enforce not using global loggers.",
"enum": ["all", "default"],
"default": "default"
"enum": ["", "all", "default"],
"default": ""
},
"no-mixed-args": {
"description": "Enforce not mixing key-value pairs and attributes.",
Expand Down

0 comments on commit 9d6d793

Please sign in to comment.