You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wondering if I'm missing anything or this is by design: I defined a bunch of logging constant keys in a separate logging package and set no-raw-keys: true, but I get false positives "raw keys should not be used (sloglint)".
linters:
disable-all: trueenable:
- sloglint # Enable only sloglintlinters-settings:
sloglint:
# Enforce not mixing key-value pairs and attributes.no-mixed-args: true# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).kv-only: false# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).attr-only: true# Enforce using methods that accept a context.context: scope# Enforce using static values for log messages.static-msg: false# Enforce using constants instead of raw keys.no-raw-keys: true# Enforce a single key naming convention.# Values: snake, kebab, camel, pascalkey-naming-case: snake# Enforce putting arguments on separate lines.args-on-sep-lines: true
Expected: No errors
Actual:
main.go:13:2: raw keys should not be used (sloglint)
slog.Info("File downloaded successfully",
^
The text was updated successfully, but these errors were encountered:
Wondering if I'm missing anything or this is by design: I defined a bunch of logging constant keys in a separate
logging
package and setno-raw-keys: true
, but I get false positives "raw keys should not be used (sloglint)".Expected: No errors
Actual:
The text was updated successfully, but these errors were encountered: