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

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

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

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

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

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

    The selected entry file is not contained by the active module root.

    Diagnostic and cause

    Ссылка

    Entry is outside module root

    Семейство
    topaz
    Этап
    resolve
    Код
    TPZ3002

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

    An entry path containing a complete .. segment is rejected with TPZ3002 before the resolver requests source files.

    Действия

    Pass the direct entry path without .. and choose a root directory that contains the entry.

    Compiler phase: resolve.

    Compiler explanation: The selected entry file is not contained by the active module root.

    Message templates are Pending. The explanation above is not an observed CLI message.

    The entry or root contains a parent path segment. The resolver also rejects a root equal to the entry or a root that does not contain it. The CLI checks the latter two cases before resolution.

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

    Trigger and repair

    An entry path containing a complete .. segment is rejected with TPZ3002 before the resolver requests source files.

    Response

    Ссылка

    Pass the direct entry path without .. and choose a root directory that contains the entry.

    Reproduction and verification

    Ссылка

    Product diagnostic test

    Ссылка
    example.tpzProduct diagnostic testОткрыть песочницу →
    1. let value = 1
    Целевой продукт 5.21.3
    Ожидаемый результат

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

    The separate diagnostic product test validates this command, runtime diagnostic, or filesystem setup. The shared example runner does not execute that assertion plan.

    Run topaz check parent/../example.tpz --language-version 5.21.

    Expect exit status 1, empty standard output, and TPZ3002.

    The entry or root contains a parent path segment. The resolver also rejects a root equal to the entry or a root that does not contain it. The CLI checks the latter two cases before resolution.

    The primary location is parent/../example.tpz:1:1.

    Expect exactly one diagnostic.

    The diagnostic product test checks these expectations with the same files and command.

    Corrected program

    Ссылка
    example.tpzCorrected program
    1. let value = 1
    Ожидаемый выводКод завершения 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.

    Меню

    Загрузка →