|
2 | 2 |
|
3 | 3 | <!-- Блоки выше заполняются автоматически, не трогать -->
|
4 | 4 | ## Description
|
5 |
| -<!-- Описание диагностики заполняется вручную. Необходимо понятным языком описать смысл и схему работу --> |
6 | 5 |
|
| 6 | +Required parameters must not be omitted when calling methods, otherwise the value `Undefined` will be passed to the parameter, which the method often cannot process. |
| 7 | +If the value `Undefined` is valid, then you need to |
| 8 | +- explicitly pass a value |
| 9 | +- or make the parameter optional with a default value of `Undefined`. |
7 | 10 | ## Examples
|
8 |
| -<!-- В данном разделе приводятся примеры, на которые диагностика срабатывает, а также можно привести пример, как можно исправить ситуацию --> |
| 11 | + |
| 12 | +For example |
| 13 | + |
| 14 | +```bsl |
| 15 | +Procedure ChangeFormFieldColor(Form, FiledName, Color) |
| 16 | +``` |
| 17 | + |
| 18 | +Incorrect: |
| 19 | + |
| 20 | +```bsl |
| 21 | +ChangeFormFieldColor(,"Result", StyleColors.ArthursShirtColor); // missing first parameter Form |
| 22 | +ChangeFormFieldColor(,,); // missing all required parameters |
| 23 | +``` |
| 24 | + |
| 25 | +Correct: |
| 26 | + |
| 27 | +```bsl |
| 28 | +ChangeFormFieldColor(ThisObject, "Result", Color); // all required parameters are specified |
| 29 | +``` |
9 | 30 |
|
10 | 31 | ## Sources
|
11 |
| -<!-- Необходимо указывать ссылки на все источники, из которых почерпнута информация для создания диагностики --> |
12 |
| -<!-- Примеры источников |
13 | 32 |
|
14 |
| -* Источник: [Стандарт: Тексты модулей](https://its.1c.ru/db/v8std#content:456:hdoc) |
15 |
| -* Полезная информация: [Отказ от использования модальных окон](https://its.1c.ru/db/metod8dev#content:5272:hdoc) |
16 |
| -* Источник: [Cognitive complexity, ver. 1.4](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) --> |
| 33 | +[Parameters of procedures and functions (RU)](https://its.1c.ru/db/v8std#content:640:hdoc) |
0 commit comments