Перейти к содержимому
Топаз6.0 · До релиза
Загрузка →

Поиск в документации

Спецификация 6.0

Выберите результат стрелками и нажмите Enter, чтобы открыть его.

Введите имя API, номер диагностики, правило или тему проекта.

    Диагностика TPZ0006

    A multiline template line does not match the closing delimiter indentation rule.

    Diagnostic and cause

    Ссылка

    Template indentation mismatch

    Семейство
    topaz
    Этап
    lex
    Код
    TPZ0006

    Причина и условия

    Each nonblank multiline-string content line must begin with the exact whitespace prefix of the closing delimiter. A line missing that prefix produces TPZ0006.

    Действия

    Align the content indentation with the closing delimiter, preserving the indentation that belongs in the resulting string.

    Compiler phase: lex.

    Compiler explanation: A multiline template line does not match the closing delimiter indentation rule.

    Message templates. The marker ⟨value⟩ stands for text computed for the reported program.

    • line does not begin with the closing indent of its multiline string Source

    Observed for the candidate in Topaz 5.21.3. Execution

    • error[TPZ0006]: line does not begin with the closing indent of its multiline string

    The content line lacks the four-space prefix before this multiline string’s closing delimiter. Nonblank lines must match that prefix exactly.

    Правилоdiagnostics.tpz0006.rule

    Trigger and repair

    Each nonblank multiline-string content line must begin with the exact whitespace prefix of the closing delimiter. A line missing that prefix produces TPZ0006.

    Response

    Ссылка

    Align the content indentation with the closing delimiter, preserving the indentation that belongs in the resulting string.

    Reproduction and verification

    Ссылка

    Rejected program

    Ссылка
    example.tpzRejected programОткрыть песочницу →
    1. let message = """
    2. text
    3. """
    Ожидаемый выводНенулевой код завершения
    Нет стандартного вывода.
    $ topaz check example.tpz · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Этап отклонения lex. Ненулевой код завершения.

    The expected diagnostic, cause, source location, and accompanying diagnostics are specified below. The verification status records whether this program has been run.

    Corrected program

    Ссылка
    example.tpzCorrected program
    1. let message = """
    2. text
    3. """
    Ожидаемый выводКод завершения 0
    $ topaz check example.tpz · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Проверка принимает программу. Код завершения 0.

    This program applies the repair described above. The verification status records whether it has been run.

    Меню

    Загрузка →