Skip to content

дописать типы ошибок валидатора в документацию #22

Description

@dima117

все типы ошибок

const renderError = (e: ValidationError): string => {
switch (e.type) {
case 'loader-error':
return `Ошибка чтения ${strong(e.fileType)} файла\n${val(e.description)}`;
case 'code-format-error':
return `Неправильный формат кода: ${val(e.code)}`;
case 'attribute-duplicate':
return `Дубликат кода атрибута: ${val(e.attribute.code)}`;
case 'attribute-value-duplicate':
return `Дубликат кода значения атрибута: ${val(e.attributeValue.code)} (атрибут ${val(e.attribute.code)})`;
case 'tree-duplicate':
return `Дубликат кода описания дерева: ${val(e.tree.code)}`;
case 'tree-missing-attribute':
return `Неизвестный атрибут в дереве: ${val(e.attributeCode)} (дерево ${val(e.tree.code)})`;
case 'tree-attribute-duplicate':
return `Повторяющийся атрибут в описании дерева: ${val(e.attributeCode)} (дерево ${val(e.tree.code)})`;
case 'featrue-code-format':
return `Неправильный формат кода фичи: ${val(e.code)}`;
case 'featrue-attribute-value-code-format':
return `Неправильный формат кода значения атрибута фичи: ${val(e.code)} (атрибут ${val(e.attribute)})`;
case 'feature-code-duplicate':
return `Дубликат кода фичи: ${val(e.code)}`;
case 'feature-missing-attribute':
return `Неизвестный атрибут: ${val(e.attributeCode)}`;
case 'feature-missing-link':
return `Неизвестная ссылка: ${val(e.link)}`;
case 'assertion-duplicate':
return `Дубликат утверждения: ${val(e.assertion.title)} (группа ${val(e.assertionGroup.title)})`;
case 'jest-unused':
return `Обнаружен тест без описания\n${val(e.test)}`;
case 'storybook-unused':
return `Обнаружена история без описания\n${val(e.story)}`;
case 'testplane-unused':
return `Обнаружен интеграционный testplane тест без описания\n${val(e.test)}`;
case 'playwright-unused':
return `Обнаружен интеграционный playwright тест без описания\n${val(e.test)}`;
}
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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