Skip to content

Commit 0064d97

Browse files
committed
chore: update implementation
1 parent 9617970 commit 0064d97

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

.golangci.next.reference.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -2722,11 +2722,16 @@ linters:
27222722
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#static-messages
27232723
# Default: false
27242724
static-msg: true
2725+
# Enforce message style.
2726+
# Values: lowercased, capitalized
2727+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#message-style
2728+
# Default: ""
2729+
msg-style: capitalized
27252730
# Enforce using constants instead of raw keys.
27262731
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-raw-keys
27272732
# Default: false
27282733
no-raw-keys: true
2729-
# Enforce a single key naming convention.
2734+
# Enforce key naming convention.
27302735
# Values: snake, kebab, camel, pascal
27312736
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-naming-convention
27322737
# Default: ""

jsonschema/golangci.next.jsonschema.json

+5
Original file line numberDiff line numberDiff line change
@@ -2962,6 +2962,11 @@
29622962
"type": "boolean",
29632963
"default": false
29642964
},
2965+
"msg-style": {
2966+
"description": "Enforce message style.",
2967+
"enum": ["", "lowercased", "capitalized"],
2968+
"default": false
2969+
},
29652970
"key-naming-case": {
29662971
"description": "Enforce a single key naming convention.",
29672972
"enum": ["snake", "kebab", "camel", "pascal"]

pkg/config/linters_settings.go

+1
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ type SlogLintSettings struct {
784784
NoGlobal string `mapstructure:"no-global"`
785785
Context string `mapstructure:"context"`
786786
StaticMsg bool `mapstructure:"static-msg"`
787+
MsgStyle string `mapstructure:"msg-style"`
787788
NoRawKeys bool `mapstructure:"no-raw-keys"`
788789
KeyNamingCase string `mapstructure:"key-naming-case"`
789790
ForbiddenKeys []string `mapstructure:"forbidden-keys"`

pkg/golinters/sloglint/sloglint.go

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ func New(settings *config.SlogLintSettings) *goanalysis.Linter {
1818
NoGlobal: settings.NoGlobal,
1919
ContextOnly: settings.Context,
2020
StaticMsg: settings.StaticMsg,
21+
MsgStyle: settings.MsgStyle,
2122
NoRawKeys: settings.NoRawKeys,
2223
KeyNamingCase: settings.KeyNamingCase,
2324
ForbiddenKeys: settings.ForbiddenKeys,

0 commit comments

Comments
 (0)