Skip to content

m message warn

Report a warning.

example::

~$ m message warn 'this is a warning' -f app.js -l 1 -c 5
::warning file=app.js,line=1,col=5::Missing semicolon
Source code in m/cli/commands/message/warn.py
class Arguments(BaseModel):
    """Report a warning.

    example::

        ~$ m message warn 'this is a warning' -f app.js -l 1 -c 5
        ::warning file=app.js,line=1,col=5::Missing semicolon
    """

    message: str = Arg(
        help='warning message',
        positional=True,
        required=True,
    )
    file: str | None = Arg(  # noqa: WPS110 - required by Github
        aliases=['f', 'file'],
        help='filename where warning occurred',
    )
    line: str | None = Arg(
        aliases=['l', 'line'],
        help='line where warning occurred',
    )
    col: str | None = Arg(
        aliases=['c', 'col'],
        help='column where warning occurred',
    )

Options

-f, --file

filename where warning occurred

-l, --line

line where warning occurred

-c, --col

column where warning occurred

Positional arguments

message

warning message