Skip to content

-static-msg raise an error on static string concatenation #79

@gnuletik

Description

@gnuletik

The following code:

logger.Warn(
    "this is a really long message, that " +
    "requires to split the line",
)

Raises the following error in golangci-lint@v2.0.2 (which uses simpler.org/sloglint@v0.9.0):

message should be a string literal or a constant (sloglint)

The message is constant even though it is built with string concatenation to split long lines.

Related to #17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions