noliteral: Local constants do not produce warnings #22

Open
opened 2024-04-10 08:28:43 +00:00 by fyrchik · 0 comments
Owner

This doesn't produce a warning, though it should

// headMsg is a distinctive part of all messages.
const headMsg = "local object storage operation"

// Write writes message about storage engine's operation to logger.
func Write(logger *logger.Logger, fields ...zap.Field) {
	logger.Info(headMsg, fields...)
}

This doesn't produce a warning, though it should ``` // headMsg is a distinctive part of all messages. const headMsg = "local object storage operation" // Write writes message about storage engine's operation to logger. func Write(logger *logger.Logger, fields ...zap.Field) { logger.Info(headMsg, fields...) } ``` https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/76398c06b00922c58363e707727ac227aa81fb13/pkg/local_object_storage/internal/log/log.go#L13
fyrchik added the
bug
label 2024-04-10 08:28:43 +00:00
Sign in to join this conversation.
No description provided.