diff --git a/docs/en/contributing/DiagnostcAddSettings.md b/docs/en/contributing/DiagnostcAddSettings.md
index a08fe84a624..6dc9b7569e6 100644
--- a/docs/en/contributing/DiagnostcAddSettings.md
+++ b/docs/en/contributing/DiagnostcAddSettings.md
@@ -69,7 +69,7 @@ diagnosticInstance.configure(configuration);
### Adding a Parameter Description
For correct operation, it is necessary to add a parameter description for each language in the diagnostic resource files.
-Diagnostic resources are located in files `resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/
Queries cannot use attributes from left-join or right-join tables without checking the values for NULL`. Such a call can lead to errors if the join condition is not met and there are no matching records in the left or right table. As a result, as a result of executing the query, you may receive unexpected data and the system may behave in an incorrect way.
-It is important to remember that any comparison of the value `NULL` with any other expression is always false, even the comparison of `NULL` and `NULL` is always false.
-The following are examples of such incorrect comparisons.
-It is correct to compare with `NULL` - operator `IS NULL` or function `ISNULL()`.
+It is important to remember that any comparison of the value `NULL` with any other expression is always false, even the comparison of `NULL` and `NULL` is always false. The following are examples of such incorrect comparisons. It is correct to compare with `NULL` - operator `IS NULL` or function `ISNULL()`.
Left \ right joins are often used, although the data allows an inner join without checking for `NULL`.
-Additional checks of field values can be performed in the 1C code, and not in the query text. This makes it difficult to read the code and refactor the code, because the context of the access to the field has to be considered in several places.
-It should be remembered that simple checks in a query are performed a little faster and easier than in interpreted 1C code.
+Additional checks of field values can be performed in the 1C code, and not in the query text. This makes it difficult to read the code and refactor the code, because the context of the access to the field has to be considered in several places. It should be remembered that simple checks in a query are performed a little faster and easier than in interpreted 1C code.
These problems are the most common mistakes made by 1C developers of all skill levels.
@@ -24,19 +19,19 @@ These problems are the most common mistakes made by 1C developers of all skill l
Example showing NULL comparison problems - joining 2 tables incorrectly and showing different comparison methods
```sdbl
-SELECT
- CASE
- WHEN LeftTable.Fld2 = 0 THEN "Equals 0 - does not work"
- WHEN LeftTable.Fld2 <> 0 THEN "NOT Equals 0 - does not work"
- WHEN LeftTable.Fld2 = NULL THEN "Equals NULL - does not work"
- WHEN LeftTable.Fld2 IS NULL THEN "IS NULL - it works"
- WHEN ISNULL(LeftTable.Fld2, 0) = 0 THEN "ISNULL() - and this works too"
- ELSE "else"
- END
+ВЫБРАТЬ
+ ВЫБОР
+ КОГДА Левая.Поле2 = 0 ТОГДА "Равно 0 - не работает"
+ КОГДА Левая.Поле2 <> 0 ТОГДА "НЕ Равно 0 - не работает"
+ КОГДА Левая.Поле2 = NULL ТОГДА "Равно NULL - не работает"
+ КОГДА Левая.Поле2 ЕСТЬ NULL ТОГДА "ЕСТЬ NULL - этот вариант работает"
+ КОГДА ЕСТЬNULL(Левая.Поле2, 0) = 0 ТОГДА "ЕСТЬNULL() - этот вариант также работает"
+ ИНАЧЕ "Иначе"
+ КОНЕЦ
ИЗ
- First AS First
- LEFT JOIN LeftTable AS LeftTable
- ON FALSE
+ Первая КАК Первая
+ ЛЕВОЕ СОЕДИНЕНИЕ Левая КАК Левая
+ ПО Ложь // чтобы не было соединения
```
Suspicious code for accessing an joined table attribute
@@ -48,7 +43,7 @@ Suspicious code for accessing an joined table attribute
ЛЕВОЕ СОЕДИНЕНИЕ РегистрНакопления.Продажи КАК РегистрПродажи
ПО ДокументыПродажи.Ссылка = РегистрПродажи.Документ
```
-Correct
+Right
```sdbl
ВЫБРАТЬ
ДокументыПродажи.Ссылка КАК ДокПродажи,
@@ -57,7 +52,7 @@ Correct
ЛЕВОЕ СОЕДИНЕНИЕ РегистрНакопления.Продажи КАК РегистрПродажи
ПО ДокументыПродажи.Ссылка = РегистрПродажи.Документ
```
-Also correct:
+Also correct
```sdbl
ВЫБРАТЬ
ДокументыПродажи.Ссылка КАК ДокПродажи,
@@ -80,19 +75,18 @@ Possible variant
РегистрПродажи.Документ ЕСТЬ НЕ NULL
//или НЕ РегистрПродажи.Документ ЕСТЬ NULL
```
-The last one is not the best, because it actually emulates an inner join.
-It is more correct to explicitly specify `INNER JOIN` instead of using a left join with a `IS NOT NULL` or `NOT IS NULL` check
+The last one is not the best, because it actually emulates an inner join. It is more correct to explicitly specify `INNER JOIN` instead of using a left join with a `IS NOT NULL` or `NOT IS NULL` check
## Sources
* [Standard: Using the ISNULL function (RU)](https://its.1c.ru/db/metod8dev/content/2653/hdoc)
-* [Guidelines: The concept of "empty" values (RU)](https://its.1c.ru/db/metod8dev/content/2614/hdoc/_top/%D0%B5%D1%81%D1%82%D1%8C%20null)
- * [Guidelines: What is the difference between a value of type Undefined and a value of type Null? (RU)](https://its.1c.ru/db/metod8dev#content:2516:hdoc)
+* [Понятие "пустых" значений - Методические рекомендации 1С](https://its.1c.ru/db/metod8dev/content/2614/hdoc/_top/%D0%B5%D1%81%D1%82%D1%8C%20null)
+ * [Guidelines: What is the difference between a value of type Undefined and a value of type Null? - Guidelines 1C](https://its.1c.ru/db/metod8dev#content:2516:hdoc)
* [Methodical recommendations: Peculiarities of communication with the virtual table of residuals (RU)](https://its.1c.ru/db/metod8dev/content/2657/hdoc/_top/%D0%B5%D1%81%D1%82%D1%8C%20null)
* [Standard: Sorting by query field that can potentially contain NULL. The article "Ordering query results" (RU)](https://its.1c.ru/db/v8std/content/412/hdoc/_top/%D0%B5%D1%81%D1%82%D1%8C%20null)
* [Methodological recommendations: Fields of a hierarchical directory can contain NULL (RU)](https://its.1c.ru/db/metod8dev/content/2649/hdoc/_top/%D0%B5%D1%81%D1%82%D1%8C%20null)
diff --git a/docs/en/diagnostics/FileSystemAccess.md b/docs/en/diagnostics/FileSystemAccess.md
index 8d42717a40a..a4d6b7bbf39 100644
--- a/docs/en/diagnostics/FileSystemAccess.md
+++ b/docs/en/diagnostics/FileSystemAccess.md
@@ -1,14 +1,20 @@
# File system access (FileSystemAccess)
+
## Description
+
-It is important to review your code. Be sure to pay attention to accessing the file system and using “external code”
+
+При код-ревью или аудите кода необходимо проверять обращения к файлам, каталогам и набор действий, выполняемых с ними, для исключения передачи конфиденциальной или защищенной информации, а также для исключения деструктивных действий с файловой системой.
+Важно проверять код от сторонних разработчиков, подрядчиков, из различных интернет-сервисов, каталогов и т.п.
The found sections of the code must be analyzed, a manual audit of the code must be performed for its correctness and safety.
## Examples
+
+
```bsl
Текст = Новый ЧтениеТекста(ПутьФайла, КодировкаТекста.ANSI); // есть замечание
Текст = Новый ЗаписьТекста(ПутьФайла, КодировкаТекста.ANSI); // есть замечание
@@ -27,12 +33,15 @@ The found sections of the code must be analyzed, a manual audit of the code must
```
## Sources
+
+
-* [File system access from application code (RU)](https://its.1c.ru/db/v8std#content:542:hdoc)
-* [Standard: Application launch security (RU)](https://its.1c.ru/db/v8std#content:774:hdoc)
-* [Safe operation - Developer's Guide (RU](https://its.1c.ru/db/v8323doc#bookmark:dev:TI000000186)
+
+- [File system access from application code (RU)](https://its.1c.ru/db/v8std#content:542:hdoc)
+- [Standard: Application launch security (RU)](https://its.1c.ru/db/v8std#content:774:hdoc)
+- [Safe operation - Developer's Guide (RU](https://its.1c.ru/db/v8323doc#bookmark:dev:TI000000186)
diff --git a/docs/en/diagnostics/ForbiddenMetadataName.md b/docs/en/diagnostics/ForbiddenMetadataName.md
index f37d83f8b8f..0c8f76019eb 100644
--- a/docs/en/diagnostics/ForbiddenMetadataName.md
+++ b/docs/en/diagnostics/ForbiddenMetadataName.md
@@ -1,7 +1,7 @@
# Metadata object has a forbidden name (ForbiddenMetadataName)
-## Description
+## Diagnostics description
It is forbidden to use the names of metadata objects (and their attributes and tabular sections), which are used when naming query tables (for example, Document, Catalog).
@@ -20,7 +20,7 @@ Wrong name
* [Standard: Organization of data storage (RU). Name, Synonym, Comment](https://its.1c.ru/db/v8std#content:474:hdoc:2.5)
diff --git a/docs/en/diagnostics/FormDataToValue.md b/docs/en/diagnostics/FormDataToValue.md
index 411bbeb6fe6..56d3c8c02ef 100644
--- a/docs/en/diagnostics/FormDataToValue.md
+++ b/docs/en/diagnostics/FormDataToValue.md
@@ -17,4 +17,4 @@ EndProcedure
## Sources
-Source: [Using of FormAttributeToValue and FormDataToValue methods (RU)](https://its.1c.ru/db/v8std#content:409:hdoc)
+Source: [Using of FormAttributeToValue and FormDataToValue methods](https://its.1c.ru/db/v8std#content:409:hdoc)
diff --git a/docs/en/diagnostics/FullOuterJoinQuery.md b/docs/en/diagnostics/FullOuterJoinQuery.md
index ba947d3d794..60746419ec5 100644
--- a/docs/en/diagnostics/FullOuterJoinQuery.md
+++ b/docs/en/diagnostics/FullOuterJoinQuery.md
@@ -27,5 +27,5 @@ EndProcedure
## Sources
-* [Restricting the use of the "FULL OUTER JOINT" construct in queries (RU)](https://its.1c.ru/db/v8std#content:435:hdoc)
-* [Administrator's Guide: Peculiarities of Using PostgreSQL (RU)](https://its.1c.ru/db/metod8dev#content:1556:hdoc)
+* [Ограничение на использование конструкции "ПОЛНОЕ ВНЕШНЕЕ СОЕДИНЕНИЕ" в запросах (RU)](https://its.1c.ru/db/v8std#content:435:hdoc)
+* [Руководство администратора, особенности использования PostgreSQL (RU)](https://its.1c.ru/db/metod8dev#content:1556:hdoc)
diff --git a/docs/en/diagnostics/FunctionNameStartsWithGet.md b/docs/en/diagnostics/FunctionNameStartsWithGet.md
index c1e8081526e..0682d42dc4a 100644
--- a/docs/en/diagnostics/FunctionNameStartsWithGet.md
+++ b/docs/en/diagnostics/FunctionNameStartsWithGet.md
@@ -7,7 +7,7 @@ In the name of the function, the word get superfluous since function by definiti
## Examples
```bsl
-// Incorrect:
+// Not correct:
Function GetNameByCode()
// Correct:
@@ -16,4 +16,4 @@ Function NameByCode()
## Sources
-* Source: [Standard: Names of procedures and functions c 6.1 (RU)](https://its.1c.ru/db/v8std#content:647:hdoc)
+* Source: [Standard: Names of procedures and functions c 6.1](https://its.1c.ru/db/v8std#content:647:hdoc)
diff --git a/docs/en/diagnostics/FunctionOutParameter.md b/docs/en/diagnostics/FunctionOutParameter.md
index b1351c5513d..1d200a36fe8 100644
--- a/docs/en/diagnostics/FunctionOutParameter.md
+++ b/docs/en/diagnostics/FunctionOutParameter.md
@@ -10,14 +10,14 @@ The function must have no output parameters. All output must be in the return va
```bsl
-// Incorrect:
+// Wrong:
ServiceURL = "";
UserName = "";
UserPassword = "";
FillConnectionParameters(ServiceURL, UserName, UserPassword);
-// Correct:
+// Correctly:
ConnectionParameters = NewConnectionParameters();
// Returned value - Structure:
// Service URL - String
diff --git a/docs/en/diagnostics/GetFormMethod.md b/docs/en/diagnostics/GetFormMethod.md
index c025d1618a6..168c5ea359b 100644
--- a/docs/en/diagnostics/GetFormMethod.md
+++ b/docs/en/diagnostics/GetFormMethod.md
@@ -3,19 +3,15 @@
## Description
-
To open forms, use the OpenForm global context method (when using the 1C: Enterprise 8.2 platform version and earlier versions, also use OpenFormModal). An alternative method, using the GetForm method, is not recommended.
-
## Examples
-
```bsl
Procedure Test()
Doc = Documents.PlanOperation.CreateDocument();
Form = Doc.GetForm("DocumentForm"); // here
EndProcedure
```
-
```bsl
Procedure Test2()
Form = GetForm("CommonForms.MyForm");
@@ -25,4 +21,4 @@ EndProcedure
## Sources
-Source: [Development standards (RU)](https://its.1c.ru/db/v8std/content/404/hdoc)
+Source: [Standard](https://its.1c.ru/db/v8std/content/404/hdoc)
diff --git a/docs/en/diagnostics/GlobalContextMethodCollision8312.md b/docs/en/diagnostics/GlobalContextMethodCollision8312.md
index a36ead7c314..c7e5f7b1d1f 100644
--- a/docs/en/diagnostics/GlobalContextMethodCollision8312.md
+++ b/docs/en/diagnostics/GlobalContextMethodCollision8312.md
@@ -6,18 +6,18 @@
The platform version `8.3.12` implements new methods of the global context, which may coincide with the configuration functions of the application solution.
-Russian variant|English variant
-:-: | :-:
-ПроверитьБит|CheckBit
-ПроверитьПоБитовойМаске|CheckByBitMask
-УстановитьБит|SetBit
-ПобитовоеИ|BitwiseAnd
-ПобитовоеИли|BitwiseOr
-ПобитовоеНе|BitwiseNot
-ПобитовоеИНе|BitwiseAndNot
-ПобитовоеИсключительноеИли|BitwiseXor
-ПобитовыйСдвигВлево|BitwiseShiftLeft
-ПобитовыйСдвигВправо|BitwiseShiftRight
+| Russian variant | English variant |
+|:--------------------------:|:-----------------:|
+| ПроверитьБит | CheckBit |
+| ПроверитьПоБитовойМаске | CheckByBitMask |
+| УстановитьБит | SetBit |
+| ПобитовоеИ | BitwiseAnd |
+| ПобитовоеИли | BitwiseOr |
+| ПобитовоеНе | BitwiseNot |
+| ПобитовоеИНе | BitwiseAndNot |
+| ПобитовоеИсключительноеИли | BitwiseXor |
+| ПобитовыйСдвигВлево | BitwiseShiftLeft |
+| ПобитовыйСдвигВправо | BitwiseShiftRight |
The configuration functions must either be renamed or deleted, replacing the call to them with the methods of the global context.
@@ -32,4 +32,4 @@ The configuration functions must either be renamed or deleted, replacing the cal
* Полезная информация: [Отказ от использования модальных окон](https://its.1c.ru/db/metod8dev#content:5272:hdoc)
* Источник: [Cognitive complexity, ver. 1.4](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) -->
-* [Transfer of configurations to the 1C: Enterprise 8.3 platform without compatibility mode with version 8.2 (RU)](https://its.1c.ru/db/metod8dev#content:5293:hdoc:pereimenovaniya_metodov_i_svojstv)
+* Source: [Migration configuration to the "1C: Enterprise 8.3" platform without the compatibility mode with version 8.2 ](https://its.1c.ru/db/metod8dev#content:5293:hdoc:pereimenovaniya_metodov_i_svojstv)
diff --git a/docs/en/diagnostics/IncorrectUseLikeInQuery.md b/docs/en/diagnostics/IncorrectUseLikeInQuery.md
index f4592f99ce2..0e32527dbaa 100644
--- a/docs/en/diagnostics/IncorrectUseLikeInQuery.md
+++ b/docs/en/diagnostics/IncorrectUseLikeInQuery.md
@@ -70,4 +70,4 @@ Query.SetParameter("NameTemplate", "FU_");
* Полезная информация: [Отказ от использования модальных окон](https://its.1c.ru/db/metod8dev#content:5272:hdoc)
* Источник: [Cognitive complexity, ver. 1.4](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) -->
-- [Standard. Features of use in operator requests LIKE (RU)](https://its.1c.ru/db/v8std/content/726/hdoc?ysclid=l3g3fkmxsx)
+- Standard. Features of use in operator requests LIKE (RU)
diff --git a/docs/en/diagnostics/IncorrectUseOfStrTemplate.md b/docs/en/diagnostics/IncorrectUseOfStrTemplate.md
index 744e14b30c2..83b9a129e24 100644
--- a/docs/en/diagnostics/IncorrectUseOfStrTemplate.md
+++ b/docs/en/diagnostics/IncorrectUseOfStrTemplate.md
@@ -21,8 +21,7 @@ Option 2 - no values are passed at all, except for a formatted string due to the
- `StrTemplate(NStr("en='Name (version %1)'", Version()));`
-Here mistake not closed parenthesis for `NStr`. As a result, the expression after evaluating `NStr` becomes empty.
-It is rather difficult to detect such an error by reading the code due to the presence of parentheses. And you can only catch it at runtime by getting an exception.
+Here mistake not closed parenthesis for `NStr 0>. As a result, the expression after evaluating NStr` becomes empty. It is rather difficult to detect such an error by reading the code due to the presence of parentheses. And you can only catch it at runtime by getting an exception.
Correct option
- `StrTemplate(NStr("en='Name (version %1)'"), Version());`
@@ -38,4 +37,4 @@ Option 3 - correct example of passing digits immediately after a template value
* Полезная информация: [Отказ от использования модальных окон](https://its.1c.ru/db/metod8dev#content:5272:hdoc)
* Источник: [Cognitive complexity, ver. 1.4](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) -->
-- [Standard: Localization Requirements (RU)](https://its.1c.ru/db/v8std/content/763/hdoc)
+- [Standard: Localization Requirements](https://its.1c.ru/db/v8std/content/763/hdoc)
diff --git a/docs/en/diagnostics/InternetAccess.md b/docs/en/diagnostics/InternetAccess.md
index ffbd2238150..311e82d9284 100644
--- a/docs/en/diagnostics/InternetAccess.md
+++ b/docs/en/diagnostics/InternetAccess.md
@@ -1,19 +1,26 @@
# Referring to Internet resources (InternetAccess)
+
## Description
+
+
Check access to Internet resources and the set of transmitted data to prevent the transfer of confidential or protected information.
## Examples
+
+
```bsl
HTTPConnection = New HTTPConnection("zabbix.localhost", 80); // error
FTPConnection = New FTPConnection(Server, Port, User, Pwd); // error
```
## Sources
+
+
-* Standard: [Checking access rights (RU)](https://its.1c.ru/db/v8std#content:737:hdoc)
+* Standard: [Checking access rights](https://its.1c.ru/db/v8std#content:737:hdoc)
diff --git a/docs/en/diagnostics/LineLength.md b/docs/en/diagnostics/LineLength.md
index dfdc54ab176..c7584a4c350 100644
--- a/docs/en/diagnostics/LineLength.md
+++ b/docs/en/diagnostics/LineLength.md
@@ -7,4 +7,4 @@ If the line length is grater than 120 characters you should you line break. It i
## Sources
-* Source: [Standard: Modules (RU)](https://its.1c.ru/db/v8std#content:456:hdoc)
+* [Standard: Modules texts(RU)](https://its.1c.ru/db/v8std#content:456:hdoc)
diff --git a/docs/en/diagnostics/LogicalOrInJoinQuerySection.md b/docs/en/diagnostics/LogicalOrInJoinQuerySection.md
index 97478f50e35..4e63ba0ed31 100644
--- a/docs/en/diagnostics/LogicalOrInJoinQuerySection.md
+++ b/docs/en/diagnostics/LogicalOrInJoinQuerySection.md
@@ -1,7 +1,9 @@
# Logical 'OR' in 'JOIN' query section (LogicalOrInJoinQuerySection)
+
## Description
+
Diagnostics reveals the use of the `OR` operator in the conditions of table joins.
The presence of the `OR` operators in connection conditions may cause the DBMS to be unable to use
@@ -12,8 +14,10 @@ The error can be solved by "spreading" the predicates of the condition with `OR`
IMPORTANT:
Diagnostics monitors the presence of predicates in the condition `OR`, over various fields, since the use of the operator `OR`
When executing a query on the SQL side, the control over the variants of one field is automatically converted to the IN condition.
+
## Examples
-1) The error will not be fixed when using `OR` over variants of a single field.
+
+1. The error will not be fixed when using `OR` over variants of a single field.
```bsl
LEFT JOIN Catalog.NomenclatureTypes КАК NomenclatureTypes
@@ -21,58 +25,61 @@ LEFT JOIN Catalog.NomenclatureTypes КАК NomenclatureTypes
AND (CatalogNomenclature.ExpirationDate > 1
OR CatalogNomenclature.ExpirationDate < 10)
```
-2) When using the `OR` operator over various fields, the error will be fixed for each occurrence of the operator.
-```bsl
-INNER JOIN Document.GoodsServicesSaling КАК GoodsServicesSaling
-ON GoodsServicesSalingGoods.Reference = GoodsServicesSaling.Reference
- AND (GoodsServicesSalingGoods.Amount > 0
- OR GoodsServicesSalingGoods.AmountVAT > 0
- OR GoodsServicesSalingGoods.AmountWithVAT > 0)
+2. When using the `OR` operator over various fields, the error will be fixed for each occurrence of the operator.
+```bsl
+ВНУТРЕННЕЕ СОЕДИНЕНИЕ Документ.РеализацияТоваровУслуг КАК РеализацияТоваровУслуг
+ПО РеализацияТоваровУслугТовары.Ссылка = РеализацияТоваровУслуг.Ссылка
+ И (РеализацияТоваровУслугТовары.Сумма > 0
+ ИЛИ РеализацияТоваровУслугТовары.СуммаНДС > 0
+ ИЛИ РеализацияТоваровУслугТовары.СуммаСНДС > 0)
+
```
It is proposed to correct such constructions by placing requests in separate packages with combining:
```bsl
-SELECT *
-FROM
-INNER JOIN Document.GoodsServicesSaling КАК GoodsServicesSaling
-ON GoodsServicesSalingGoods.Reference = GoodsServicesSaling.Reference
- AND GoodsServicesSalingGoods.Amount > 0
-
-UNION ALL
-
-SELECT *
-FROM
-INNER JOIN Document.GoodsServicesSaling КАК GoodsServicesSaling
-ON GoodsServicesSalingGoods.Reference = GoodsServicesSaling.Reference
- AND GoodsServicesSalingGoods.AmountVAT > 0
-
-UNION ALL
-
-SELECT *
-FROM
-INNER JOIN Document.GoodsServicesSaling КАК GoodsServicesSaling
-ON GoodsServicesSalingGoods.Reference = GoodsServicesSaling.Reference
- AND GoodsServicesSalingGoods.AmountWithVAT > 0
+ВЫБРАТЬ *
+ИЗ
+ВНУТРЕННЕЕ СОЕДИНЕНИЕ Документ.РеализацияТоваровУслуг КАК РеализацияТоваровУслуг
+ПО РеализацияТоваровУслугТовары.Ссылка = РеализацияТоваровУслуг.Ссылка
+ И РеализацияТоваровУслугТовары.Сумма > 0
+
+ОБЪЕДИНИТЬ ВСЕ
+
+ВЫБРАТЬ *
+ИЗ
+ВНУТРЕННЕЕ СОЕДИНЕНИЕ Документ.РеализацияТоваровУслуг КАК РеализацияТоваровУслуг
+ПО РеализацияТоваровУслугТовары.Ссылка = РеализацияТоваровУслуг.Ссылка
+ И РеализацияТоваровУслугТовары.СуммаНДС > 0
+
+ОБЪЕДИНИТЬ ВСЕ
+
+ВЫБРАТЬ *
+ИЗ
+ВНУТРЕННЕЕ СОЕДИНЕНИЕ Документ.РеализацияТоваровУслуг КАК РеализацияТоваровУслуг
+ПО РеализацияТоваровУслугТовары.Ссылка = РеализацияТоваровУслуг.Ссылка
+ И РеализацияТоваровУслугТовары.СуммаСНДС > 0
```
-3) Diagnostics will also work for nested connections using `OR` in conditions.
+3. Diagnostics will also work for nested connections using `OR` in conditions.
```bsl
-Document.GoodsServicesSaling.Goods КАК GoodsServicesSalingGoods
-INNER JOIN Document.GoodsServicesSaling КАК GoodsServicesSaling
-ON GoodsServicesSalingGoods.Reference = GoodsServicesSaling.Reference
-LEFT JOIN Catalog.Nomenclature КАК CatalogNomenclature
- LEFT JOIN Catalog.NomenclatureTypes КАК NomenclatureTypes
- ON CatalogNomenclature.NomenclatureType = NomenclatureTypes.Reference
- AND (CatalogNomenclature.ExpirationDate > 1
- OR NomenclatureTypes.SaleThroughAPatentIsProhibited = TRUE)
-
+Документ.РеализацияТоваровУслуг.Товары КАК РеализацияТоваровУслугТовары
+ВНУТРЕННЕЕ СОЕДИНЕНИЕ Документ.РеализацияТоваровУслуг КАК РеализацияТоваровУслуг
+ПО РеализацияТоваровУслугТовары.Ссылка = РеализацияТоваровУслуг.Ссылка
+ЛЕВОЕ СОЕДИНЕНИЕ Справочник.Номенклатура КАК СправочникНоменклатура
+ ЛЕВОЕ СОЕДИНЕНИЕ Справочник.ВидыНоменклатуры КАК ВидыНоменклатуры //Тест работы на вложенном соединении
+ ПО СправочникНоменклатура.ВидНоменклатуры = ВидыНоменклатуры.Ссылка
+ И (СправочникНоменклатура.СрокГодности > 1
+ ИЛИ ВидыНоменклатуры.ЗапрещенаПродажаЧерезПатент = ИСТИНА)
+
```
+
A fix similar to paragraph 2 is recommended by replacing the nested connection with a connection with the creation of an intermediate temporary table.
## Sources
+
- [Standard: Effective Query Conditions, Clause 2 (RU)](https://its.1c.ru/db/v8std/content/658/hdoc)
- [Typical Causes of Suboptimal Query Performance and Optimization Techniques: Using Logical OR in Conditions (RU)](https://its.1c.ru/db/content/metod8dev/src/developers/scalability/standards/i8105842.htm#or)
diff --git a/docs/en/diagnostics/LogicalOrInTheWhereSectionOfQuery.md b/docs/en/diagnostics/LogicalOrInTheWhereSectionOfQuery.md
index b18343af43b..9a89bf80eb0 100644
--- a/docs/en/diagnostics/LogicalOrInTheWhereSectionOfQuery.md
+++ b/docs/en/diagnostics/LogicalOrInTheWhereSectionOfQuery.md
@@ -2,48 +2,39 @@
## Description
-
-Не следует использовать `ИЛИ` в секции `ГДЕ` запроса. Это может привести к тому, что СУБД не сможет использовать
-индексы таблиц и будет выполнять сканирование, что увеличит время работы запроса и вероятность возникновения блокировок.
-Вместо этого следует разбить один запрос на несколько и объединить результаты.
+Do not use `OR` in the `WHERE` section of the query. Это может привести к тому, что СУБД не сможет использовать индексы таблиц и будет выполнять сканирование, что увеличит время работы запроса и вероятность возникновения блокировок. Instead, you should split one query into several and combine the results.
-## Примеры
+## Examples
For example, query:
```bsl
-SELECT Goods.Description FROM Catalog.Goods AS Goods
-WHERE Code = "001" OR Cost = 10
+SELECT Item.Name FROM Directory.Products AS Item
+WHERE Article = "001" OR Price = 10
```
should instead of a query:
```bsl
-SELECT Goods.Description FROM Catalog.Goods AS Goods
-WHERE Code = "001"
-
+SELECT Product.Name FROM Directory.Products AS Product WHERE Article = "001"
UNION ALL
-
-SELECT Goods.Description FROM Catalog.Goods AS Goods
-WHERE Cost = 10
-
+SELECT Product.Name FROM Directory.Products AS Product WHERE Price = 10
```
+> **Important** - the current diagnostic implementation triggers any `OR` in the `WHERE` section and may give false positives for some conditions.
->**Important** - the current implementation of the diagnostic triggers on any `OR` in the `WHERE` section and may issue false positives for some conditions.
-
-1) In the main condition, the `OR` operator can only be used for the last used or the only index field, when the `OR` operator can be replaced by the `IN` operator.
+1) In the main condition, the `OR` operator can be used only for the last used or the only index field, when the `OR` operator can be replaced with the `IN` operator.
Correct:
```bsl
WHERE
- Table.Filed = &Value1
- OR Table.Filed = &Value2
+ Table.Field = &Value1
+ OR Table.Field = &Value2
```
-because can be rewritten using the `IN` operator (you don’t need to specifically rewrite it, you can leave it as it is):
+since can be rewritten using the `IN` operator (you don't need to rewrite it specifically, you can leave it as it is):
```bsl
WHERE
@@ -54,55 +45,54 @@ Incorrect:
```bsl
WHERE
- Table.Field1 = &Value1
- OR Table.Field2 = &Value2
+ Table.Field1 = &Value1
+ OR Table.Field2 = &Value2
```
-cannot be rewritten with `IN`, but can be rewritten with `UNION ALL` (each Field1 and Field2 must be indexed):
+cannot be overwritten with `IN`, but can be overwritten with `UNION ALL` (each field Field1 and Field2 must be indexed):
```bsl
WHERE
- Table.Field1 = &Value1
+ Table.Field1 = &Value1
-UNION ALL
+ОБЪЕДИНИТЬ ВСЕ
WHERE
- Table.Field2 = &Value1
+ Table.Field2 = &Value1
```
+> Note: replacing `OR` with `UNION ALL` is not always possible, make sure the result is indeed the same as `OR` before use.
->Note: it is not always possible to replace `OR` with `UNION ALL`, make sure the result is really the same as with `OR` before applying.
-
-2) Additionally, the 'OR' operator can be used without restriction.
+2) In an additional condition, the OR operator can be used without restrictions.
Correct:
```bsl
WHERE
- Table.Filed1 = &Value1 // Main condition (use index)
- AND // Addition condition (can use OR)
- (Table.Filed2 = &Value2 OR Table.Filed3 = &Value3)
+ Table.Field1 = &Value1 // Main condition (uses index)
+ AND // Additional condition (you can use OR)
+ (Table.Field2 = &Value2 OR Table.Field3 = &Value3)
```
Correct:
```bsl
WHERE
- (Table.Filed1 = &Value1 OR Table.Filed1 = &Value2)
- AND
- (Table.Filed2 = &Value3 OR Table.Filed2 = &Value4)
+ (Table.Field1 = &Value1 OR Table.Field1 = &Value2)
+ AND
+ (Table.Field2 = &Value3 OR Table.Field2 = &Value4)
```
-because can be rewritten using 'IN' (no special rewriting needed, can be left as is):
+since can be rewritten using the IN operator (you don't need to rewrite it specifically, you can leave it as it is):
```bsl
WHERE
- Table.Field1 IN (&Value1) // Main condition
- AND Table.Field2 IN (&Value2) // Additional condition (or vice versa)
+ Table.Field1 B (&Values1) // Main condition
+ AND Table.Field2 B (&Values2) // Additional condition (or vice versa)
```
## Sources
-- [Standard: Effective Query Conditions, Clause 2 (RU)](https://its.1c.ru/db/v8std/content/658/hdoc)
-- [Typical Causes of Suboptimal Query Performance and Optimization Techniques: Using Logical OR in Conditions (RU)](https://its.1c.ru/db/content/metod8dev/src/developers/scalability/standards/i8105842.htm#or)
-- [Article on Habr: Interesting analysis of SQL queries in various DBMS (not about 1C) (RU)](https://m.habr.com/ru/company/lsfusion/blog/463095/)
+- [Standard - Effective Query Conditions, Clause 2](https://its.1c.ru/db/v8std/content/658/hdoc)
+- [Using Logical OR in Conditions - Typical Causes of Suboptimal Query Performance and Optimization Techniques](https://its.1c.ru/db/content/metod8dev/src/developers/scalability/standards/i8105842.htm#or)
+- [Interesting analysis of SQL queries in various DBMS (not about 1C) - Article on Habr](https://m.habr.com/ru/company/lsfusion/blog/463095/)
diff --git a/docs/en/diagnostics/MagicDate.md b/docs/en/diagnostics/MagicDate.md
index d190366d1c4..4cf6533fe00 100644
--- a/docs/en/diagnostics/MagicDate.md
+++ b/docs/en/diagnostics/MagicDate.md
@@ -23,8 +23,7 @@ If now < PredictedDate Then
EndIf;
```
-Also, a good solution is to use a special method with "telling name" that returns
-constant
+Also, a good solution is to use a special method with "telling name" that returns constant
```bsl
Function DateInventionHover()
diff --git a/docs/en/diagnostics/MethodSize.md b/docs/en/diagnostics/MethodSize.md
index 3264f781b64..85c32648b3b 100644
--- a/docs/en/diagnostics/MethodSize.md
+++ b/docs/en/diagnostics/MethodSize.md
@@ -11,9 +11,9 @@ There are two rules for refactoring a large method:
- If when writing a method you want to add a comment to the code, you must put this functionality in a separate method
- If the method takes more than 50-100 lines of code, you should determine the tasks and subtasks that it performs and try to put the subtasks in a separate method
-## Sources
+## Reference
- [Software Architecture Refactoring: Layering](http://citforum.ru/SE/project/refactor/)
- [Martin Fowler: Refactoring](https://www.refactoring.com/)
-- [Refactoring and opt-out tools (RU)](https://v8.1c.ru/o7/201312ref/index.htm)
-- [Refactoring tools in 1C (RU)](https://www.koderline.ru/expert/programming/article-vspomogatelnye-funktsii-v-1s/#anchor6)
+- [Refactoring and opt-out tools](https://v8.1c.ru/o7/201312ref/index.htm)
+- [Refactoring tools in 1C](https://www.koderline.ru/expert/programming/article-vspomogatelnye-funktsii-v-1s/#anchor6)
diff --git a/docs/en/diagnostics/MissedRequiredParameter.md b/docs/en/diagnostics/MissedRequiredParameter.md
index 1c260e27cd0..02e8a895841 100644
--- a/docs/en/diagnostics/MissedRequiredParameter.md
+++ b/docs/en/diagnostics/MissedRequiredParameter.md
@@ -1,12 +1,15 @@
# Missed a required method parameter (MissedRequiredParameter)
+
## Description
-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.
+При вызове функций не следует пропускать обязательные параметры. В противном случае в параметр будет передано значение `Неопределено`, на которое функция может быть не рассчитана.
If the value `Undefined` is valid, then you need to
-- explicitly pass a value
+
+- или его передавать в функцию явно
- or make the parameter optional with a default value of `Undefined`.
+
## Examples
For example
diff --git a/docs/en/diagnostics/MissingCodeTryCatchEx.md b/docs/en/diagnostics/MissingCodeTryCatchEx.md
index d9bfa58cb24..54742f4fdce 100644
--- a/docs/en/diagnostics/MissingCodeTryCatchEx.md
+++ b/docs/en/diagnostics/MissingCodeTryCatchEx.md
@@ -5,7 +5,7 @@
It is unacceptable to catch any exception, without any trace for system administrator.
-*Incorrect*
+*Wrong*
```bsl
Try
@@ -18,7 +18,7 @@ EndTry;
As a rule, such a design hides a real problem, which is subsequently impossible to diagnose.
-*Correct*
+*Right*
```bsl
Try
diff --git a/docs/en/diagnostics/MissingCommonModuleMethod.md b/docs/en/diagnostics/MissingCommonModuleMethod.md
index ee61d21f3a9..12a7872ddfd 100644
--- a/docs/en/diagnostics/MissingCommonModuleMethod.md
+++ b/docs/en/diagnostics/MissingCommonModuleMethod.md
@@ -1,21 +1,30 @@
# Referencing a missing common module method (MissingCommonModuleMethod)
+
## Description
+
+
Diagnostics detects erroneous calls to methods of common modules.
-Detects the following errors
+Находятся проблемные варианты
+
- method does not exist in the specified common module
- method is in the common module, but it is not exported
- if a common module has no source code, then all calls to its methods are marked as erroneous
-Excluded
+Исключаются варианты
+
- the variable name is the same as the common module name
+
## Examples
+
## Sources
+
+
-* Standart: [Procedures and functions description (RU)](https://its.1c.ru/db/v8std#content:453:hdoc)
+* Standart: Procedures and functions description
diff --git a/docs/en/diagnostics/MissingReturnedValueDescription.md b/docs/en/diagnostics/MissingReturnedValueDescription.md
index c6bd3beb5b8..f285808380b 100644
--- a/docs/en/diagnostics/MissingReturnedValueDescription.md
+++ b/docs/en/diagnostics/MissingReturnedValueDescription.md
@@ -26,4 +26,4 @@ Diagnostics detects typical errors:
* Полезная информация: [Отказ от использования модальных окон](https://its.1c.ru/db/metod8dev#content:5272:hdoc)
* Источник: [Cognitive complexity, ver. 1.4](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) -->
-* Standart: [Procedures and functions description (RU)](https://its.1c.ru/db/v8std#content:453:hdoc)
+* Standart: [Procedures and functions description](https://its.1c.ru/db/v8std#content:453:hdoc)
diff --git a/docs/en/diagnostics/MissingSpace.md b/docs/en/diagnostics/MissingSpace.md
index 578292e666b..48f624f5a69 100644
--- a/docs/en/diagnostics/MissingSpace.md
+++ b/docs/en/diagnostics/MissingSpace.md
@@ -1,4 +1,4 @@
-# Missing spaces to the left or right of operators + - * / = % < > <> <= >=, keywords, and also to the right of , and ; (MissingSpace)
+# Missing spaces to the left or right of operators `+ - * / = % < > <> <= >=`, keywords, and also to the right of `,` and `;` (MissingSpace)
## Description
diff --git a/docs/en/diagnostics/MissingTempStorageDeletion.md b/docs/en/diagnostics/MissingTempStorageDeletion.md
index 913eec8739c..1ec2b8795a4 100644
--- a/docs/en/diagnostics/MissingTempStorageDeletion.md
+++ b/docs/en/diagnostics/MissingTempStorageDeletion.md
@@ -1,14 +1,5 @@
-# Missing temporary storage data deletion after using (MissingTempStorageDeletion)
-
-
-## Description
-
# Отсутствует удаление данных из временного хранилища после использования (MissingTempStorageDeletion)
-| Type | Scope | Severity | Activated by default | Minutes
to fix | Tags |
-|:------------:|:-------------------:|:----------:|:--------------------:|:------------------------:|:--------------------------------------------------------:|
-| `Code smell` | `BSL`
`OS` | `Critical` | `No` | `3` | `standard`
`performance`
`badpractice` |
-
## Diagnostics description
@@ -29,7 +20,7 @@ Remember that when a value is retrieved from the temporary storage on the server
## Examples
-
+
1 - Example of correct code:
```bsl
&НаКлиенте
@@ -51,11 +42,11 @@ Remember that when a value is retrieved from the temporary storage on the server
2 - Consider this recommendation when working with background jobs
-Incorrect:
+Wrong:
- Each time a background job is executed, its result is placed in temporary storage for the lifetime of the form:
```bsl
-Parameters = LongOperations.FunctionParameters(UUID);
-LongOperations.ExecFunction(Pframeters, BackgroundJobParameter);
+ПараметрыВыполнения = ДлительныеОперации.ПараметрыВыполненияФункции(УникальныйИдентификатор);
+ДлительныеОперации.ВыполнитьФункцию(ПараметрыВыполнения, ПараметрФоновогоЗадания);
```
- If a long operation is performed by the user multiple times, then temporary storage accumulates, which causes an increase in memory consumption.
@@ -69,10 +60,10 @@ Correct:
- If the result of a background job needs to be saved over several server calls, then it is necessary to transfer a fixed address of a previously initialized temporary storage:
```bsl
-&AtServer
+&НаСервере
Процедура ПриСозданииНаСервере(Отказ)
АдресРезультатаФоновогоЗадания = ПоместитьВоВременноеХранилище(Неопределено, УникальныйИдентификатор); // Резервируем адрес временного хранилища
-EndProcedure
+КонецПроцедуры
&НаСервере
Функция НачатьПоискНастроекУчетнойЗаписи()
@@ -82,7 +73,7 @@ EndProcedure
Возврат ДлительныеОперации.ВыполнитьФункцию(ПараметрыВыполнения,
"Справочники.УчетныеЗаписиЭлектроннойПочты.ОпределитьНастройкиУчетнойЗаписи",
АдресЭлектроннойПочты, Пароль);
-EndFunction
+КонецФункции
```
3 - Another example of preliminary initialization of temporary storage for reuse
diff --git a/docs/en/diagnostics/MissingTemporaryFileDeletion.md b/docs/en/diagnostics/MissingTemporaryFileDeletion.md
index 5d647e3cdb0..d93d8a7d49a 100644
--- a/docs/en/diagnostics/MissingTemporaryFileDeletion.md
+++ b/docs/en/diagnostics/MissingTemporaryFileDeletion.md
@@ -3,8 +3,7 @@
## Description
-After you finished working with temporary file or folder, you need to delete it yourself.
-You should not rely on automatic deletion of files and folders before platform start. This can cause temp folder free space shortage.
+After you finished working with temporary file or folder, you need to delete it yourself. You should not rely on automatic deletion of files and folders before platform start. This can cause temp folder free space shortage.
## Examples
@@ -16,7 +15,7 @@ Data.Write(TempFileName);
// Not delete temporary file
```
-Correct:
+Сorrect:
```bsl
TempFileName = GetTempFileName("xml");
@@ -33,7 +32,7 @@ Catch
EndTry;
```
-## Nuances
+## Peculiarities
Diagnostics determines the correctness of working with temporary files by the presence of methods for deleting or moving.
@@ -49,4 +48,4 @@ and so on.
## Sources
-* [File system access from application code (RU)](https://its.1c.ru/db/v8std#content:542:hdoc)
+* [File system access from application code](https://its.1c.ru/db/v8std#content:542:hdoc)
diff --git a/docs/en/diagnostics/MissingVariablesDescription.md b/docs/en/diagnostics/MissingVariablesDescription.md
index 6ccbf98337f..9be9b881645 100644
--- a/docs/en/diagnostics/MissingVariablesDescription.md
+++ b/docs/en/diagnostics/MissingVariablesDescription.md
@@ -26,4 +26,4 @@ Var Context;
## Sources
-* Source: [Standard: Module structure (RU)](https://its.1c.ru/db/v8std#content:455:hdoc)
+* Reference: [Code conventions. Module structure](https://its.1c.ru/db/v8std#content:455:hdoc)
diff --git a/docs/en/diagnostics/MultilineStringInQuery.md b/docs/en/diagnostics/MultilineStringInQuery.md
index 9ea98cce49f..893892c7527 100644
--- a/docs/en/diagnostics/MultilineStringInQuery.md
+++ b/docs/en/diagnostics/MultilineStringInQuery.md
@@ -12,15 +12,15 @@ Multi-line literals are rarely used in query texts, mostly these are error resul
In the example below, the selection will have two fields instead of three.
```bsl
-Query = New Query;
-Query.Text = "SELECT
-| OrderGoods.Cargo AS Cargo,
-| ISNULL(OrderGoods.Cargo.Code, "") AS CargoCode, // quote error here, should be """"
-| ISNULL(OrderGoods.Cargo.Name, "") AS CargoName
-|FROM
-| Document.Order.Goods AS OrderGoods
-|WHERE
-| OrderGoods.Ref = &Ref";
+Запрос = Новый Запрос;
+Запрос.Текст = "ВЫБРАТЬ
+| ПриходныйОрдерНоменклатура.Номенклатура КАК Номенклатура,
+| ЕСТЬNULL(ПриходныйОрдерНоменклатура.Номенклатура.Код, "") КАК НоменклатураКод, // здесь ошибка с кавычками, должно быть """"
+| ЕСТЬNULL(ПриходныйОрдерНоменклатура.Номенклатура.Наименование, "") КАК НоменклатураНаименование
+|ИЗ
+| Документ.ПриходныйОрдер.Номенклатура КАК ПриходныйОрдерНоменклатура
+|ГДЕ
+| ПриходныйОрдерНоменклатура.Ссылка = &Ссылка";
```
## Sources
diff --git a/docs/en/diagnostics/MultilingualStringHasAllDeclaredLanguages.md b/docs/en/diagnostics/MultilingualStringHasAllDeclaredLanguages.md
index 2acd7426188..06c561d8627 100644
--- a/docs/en/diagnostics/MultilingualStringHasAllDeclaredLanguages.md
+++ b/docs/en/diagnostics/MultilingualStringHasAllDeclaredLanguages.md
@@ -7,4 +7,4 @@ NStr in a multilingual configuration has different fragments for different langu
## Sources
-- [Standard: Localization Requirements (RU)](https://its.1c.ru/db/v8std/content/763/hdoc)
+- [localization requirements](https://its.1c.ru/db/v8std/content/763/hdoc)
diff --git a/docs/en/diagnostics/MultilingualStringUsingWithTemplate.md b/docs/en/diagnostics/MultilingualStringUsingWithTemplate.md
index efe52879cc4..5af8cf2f0ca 100644
--- a/docs/en/diagnostics/MultilingualStringUsingWithTemplate.md
+++ b/docs/en/diagnostics/MultilingualStringUsingWithTemplate.md
@@ -3,9 +3,8 @@
## Description
-NStr in a multilingual configuration has different fragments for different languages.
-If you start a session under a language code that is not in the string passed to NStr, it will return an empty string. When used with StrTemplate, an empty string returned from NStr will throw an exception.
+NStr in a multilingual configuration has different fragments for different languages. If you start a session under a language code that is not in the string passed to NStr, it will return an empty string. When used with StrTemplate, an empty string returned from NStr will throw an exception.
## Sources
-- [localization requirements (RU)](https://its.1c.ru/db/v8std/content/763/hdoc)
+- [localization requirements](https://its.1c.ru/db/v8std/content/763/hdoc)
diff --git a/docs/en/diagnostics/NestedFunctionInParameters.md b/docs/en/diagnostics/NestedFunctionInParameters.md
index da3cf9f7f8e..e719eee29da 100644
--- a/docs/en/diagnostics/NestedFunctionInParameters.md
+++ b/docs/en/diagnostics/NestedFunctionInParameters.md
@@ -12,7 +12,7 @@ At the same time, if the code with nested calls is compact (does not require the
## Examples
-Incorrect:
+Wrong:
```bsl
Attachments.Insert( AttachedFile.Description, New Picture(GetFromTempStorage( AttachedFiles.GetFileData(AttachedFile.Ref).RefToFileBinaryData)));
diff --git a/docs/en/diagnostics/NestedStatements.md b/docs/en/diagnostics/NestedStatements.md
index 7f6f07559f3..32d3dcc9bce 100644
--- a/docs/en/diagnostics/NestedStatements.md
+++ b/docs/en/diagnostics/NestedStatements.md
@@ -9,7 +9,7 @@ Such code is hard for reading, refactoring and support.
## Examples
-Incorrect
+Wrong
```bsl
diff --git a/docs/en/diagnostics/NestedTernaryOperator.md b/docs/en/diagnostics/NestedTernaryOperator.md
index e61e3553372..cd7ffabebbb 100644
--- a/docs/en/diagnostics/NestedTernaryOperator.md
+++ b/docs/en/diagnostics/NestedTernaryOperator.md
@@ -16,7 +16,7 @@ Result = ?(X%15 <> 0, ?(X%5 <> 0, ?(X%3 <> 0, x, "Fizz"), "Buzz"), "FizzBuzz");
```bsl
If ?(P.Emp_emptype = Null, 0, PageEmp_emptype) = 0 Then
- Status = "Done";
+ Status = "Done";
EndIf;
```
@@ -38,7 +38,7 @@ EndIf;
```bsl
If PageEmp_emptype = Null OR PageEmp_emptype = 0 Then
- Status = "Done";
+ Status = "Done";
End If;
```
diff --git a/docs/en/diagnostics/NonExportMethodsInApiRegion.md b/docs/en/diagnostics/NonExportMethodsInApiRegion.md
index ebe5306dc2f..d5f9b7f756f 100644
--- a/docs/en/diagnostics/NonExportMethodsInApiRegion.md
+++ b/docs/en/diagnostics/NonExportMethodsInApiRegion.md
@@ -7,6 +7,6 @@
* The “Service Programming Interface” region is intended for modules that are part of some functional subsystem. It should contain export procedures and functions that can only be called from other functional subsystems of the same library.
-## Sources
+## Reference
-* Source: [Standard: Module structure (RU)](https://its.1c.ru/db/v8std#content:455:hdoc)
+* [Module structure](https://its.1c.ru/db/v8std#content:455:hdoc)
diff --git a/docs/en/diagnostics/NonStandardRegion.md b/docs/en/diagnostics/NonStandardRegion.md
index 4d4343a2d19..a11fe2c73b0 100644
--- a/docs/en/diagnostics/NonStandardRegion.md
+++ b/docs/en/diagnostics/NonStandardRegion.md
@@ -14,4 +14,4 @@ The set of sections for each type of module (form module, object module, common
-* Source: [Standard: Module structure (RU)](https://its.1c.ru/db/v8std#content:455:hdoc)
+* Reference: [Code conventions. Module structure](https://its.1c.ru/db/v8std#content:455:hdoc)
diff --git a/docs/en/diagnostics/NumberOfParams.md b/docs/en/diagnostics/NumberOfParams.md
index a41fe530467..f7adc5a29cb 100644
--- a/docs/en/diagnostics/NumberOfParams.md
+++ b/docs/en/diagnostics/NumberOfParams.md
@@ -12,9 +12,9 @@ If need to pass many parameters to a function, it is recommended to group same-t
Incorrect:
```bsl
-// Create an item in catalog "Goods"
-Procedure CreateSKU(Name, Goods, Units, Weight, Check = True)
-// ...
+// Create item in catalog "Goods"
+Procedure CreateNewGoods(Description, Goods, Units, Weight, Check = True)
+
EndProcedure
```
@@ -24,9 +24,10 @@ Group parameters, having goods item properties into Structure Values.
```bsl
// Create item in catalog "Goods"
Procedure CreateNewGoods(Values, Check = True)
+
EndProcedure
```
## Sources
-* [Standard: Parameters of procedures and functions (RU)](https://its.1c.ru/db/v8std#content:640:hdoc)
+* [Standard: Procedure and function parameters (RU)](https://its.1c.ru/db/v8std#content:640:hdoc)
diff --git a/docs/en/diagnostics/NumberOfValuesInStructureConstructor.md b/docs/en/diagnostics/NumberOfValuesInStructureConstructor.md
index 1a671b585b7..771088dda6e 100644
--- a/docs/en/diagnostics/NumberOfValuesInStructureConstructor.md
+++ b/docs/en/diagnostics/NumberOfValuesInStructureConstructor.md
@@ -51,6 +51,6 @@ Parameters.Insert("UUID ", UUID);
Parameters.Insert("Description", Description);
```
-## Sources
+## Reference
-* [Standard: Using objects of type Structure (RU)](https://its.1c.ru/db/v8std#content:693:hdoc)
+* [Standard: Using objects of type Structure](https://its.1c.ru/db/v8std#content:693:hdoc)
diff --git a/docs/en/diagnostics/OneStatementPerLine.md b/docs/en/diagnostics/OneStatementPerLine.md
index 15301e9ca09..60af845d0c4 100644
--- a/docs/en/diagnostics/OneStatementPerLine.md
+++ b/docs/en/diagnostics/OneStatementPerLine.md
@@ -9,4 +9,4 @@ Module texts are formatted according to the "one statement in one line" principl
## Sources
-* Source: [Standard: Modules (RU)](https://its.1c.ru/db/v8std#content:456:hdoc)
+* [Standard: Modules texts(RU)](https://its.1c.ru/db/v8std#content:456:hdoc)
diff --git a/docs/en/diagnostics/OrdinaryAppSupport.md b/docs/en/diagnostics/OrdinaryAppSupport.md
index 2473b21803d..7bf9214ca50 100644
--- a/docs/en/diagnostics/OrdinaryAppSupport.md
+++ b/docs/en/diagnostics/OrdinaryAppSupport.md
@@ -21,4 +21,4 @@ The refusal to support the launch of configuration in the ordinary application a
## Sources
-* Source: [Standard: General Configuration Requirements (RU)](https://its.1c.ru/db/v8std#content:467:hdoc)
+* Source: [Standard: General Configuration Requirements](https://its.1c.ru/db/v8std#content:467:hdoc)
diff --git a/docs/en/diagnostics/PairingBrokenTransaction.md b/docs/en/diagnostics/PairingBrokenTransaction.md
index aee827bc13c..12854e2658b 100644
--- a/docs/en/diagnostics/PairingBrokenTransaction.md
+++ b/docs/en/diagnostics/PairingBrokenTransaction.md
@@ -51,6 +51,6 @@ EndProcedure
```
-## Sources
+## Reference
-* [Transactions: Rules of Use (RU)](https://its.1c.ru/db/v8std/content/783/hdoc/_top/)
+* [Transactions: Terms of Use](https://its.1c.ru/db/v8std#content:783:hdoc)
diff --git a/docs/en/diagnostics/ParseError.md b/docs/en/diagnostics/ParseError.md
index 04049dfa24b..89301abe55d 100644
--- a/docs/en/diagnostics/ParseError.md
+++ b/docs/en/diagnostics/ParseError.md
@@ -9,7 +9,7 @@ Separate grammatical constructions, expressions, as well as declarations and pla
## Examples
-Incorrect:
+Wrong:
```bsl
Procedure Example1()
diff --git a/docs/en/diagnostics/PrivilegedModuleMethodCall.md b/docs/en/diagnostics/PrivilegedModuleMethodCall.md
index 87647762992..dab94cef7b7 100644
--- a/docs/en/diagnostics/PrivilegedModuleMethodCall.md
+++ b/docs/en/diagnostics/PrivilegedModuleMethodCall.md
@@ -1,16 +1,34 @@
# Accessing privileged module methods (PrivilegedModuleMethodCall)
+
## Description
+
-Code running in `privileged` `mode` must be checked.
+
+При обращении к публичным процедурам и функциям привилегированных общих модулей могут нарушаться ограничения конфигурации по правам и ролям конфигурации, решения 1С.
+Необходимо провалидировать подобные обращения для исключения обхода ограничений.
## Examples
+
+Например, в конфигурации существует привилегированный модуль выполнения заданий с именем `Задания`.
+В этом модуле есть публичная функция `Функция ДобавитьЗадание(Знач ИмяМетода, Знач Параметры) Экспорт`.
+Какой-то код конфигурации или расширения обращается к этому методу `Задания.ДобавитьЗадание("МетодДляВыполнения", Параметры);`
+
+Необходимо проанализировать код и убедиться в том, что:
+
+- указан правильный метод для выполнения задания - `МетодДляВыполнения`
+- метод `МетодДляВыполнения` для выполнения задания не выполняет деструктивных действий
+- и не выдает пользователям данные, запрещенные ограничениями конфигурации
+
## Sources
+
+
+* Источник: [Cognitive complexity, ver. 1.4](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) -->
diff --git a/docs/en/diagnostics/ProtectedModule.md b/docs/en/diagnostics/ProtectedModule.md
index 7a6babe4907..31c76fb0873 100644
--- a/docs/en/diagnostics/ProtectedModule.md
+++ b/docs/en/diagnostics/ProtectedModule.md
@@ -1,16 +1,22 @@
# Protected modules (ProtectedModule)
+
## Description
+
+
The absence of module sources in the configuration is not recommended.
In the case of a closed, password-protected module, the quality of the code decreases, it is impossible to review the code, and versioning of changes is not carried out.
## Examples
+
## Sources
+
+
+
## Description
-Diagnostics allows you to control the dereference of reference fields through a dot in the 1C query language.
-The purpose of this diagnostic is to prevent unnecessary implicit joins between tables.
-and as a result, improve the performance of executing a database query.
+
+Diagnostics allows you to control the dereference of reference fields through a dot in the 1C query language. The purpose of this diagnostic is to prevent unnecessary implicit joins between tables. and as a result, improve the performance of executing a database query.
## Examples
+
1. Base dereference through a dot (in temp. db or in select query)
`ЗаказКлиентаТовары.Ссылка.Организация КАК Организация`
2. Dereference of fields in table join section
`ВТ_РасчетыСКлиентами КАК ВТ_РасчетыСКлиентами
- ЛЕВОЕ СОЕДИНЕНИЕ ВТ_ДанныеЗаказовКлиента КАК ВТ_ДанныеЗаказовКлиента
- ПО ВТ_РасчетыСКлиентами.АналитикаУчетаПоПартнерам.Партнер = ВТ_ДанныеЗаказовКлиента.Партнер`
+ ЛЕВОЕ СОЕДИНЕНИЕ ВТ_ДанныеЗаказовКлиента КАК ВТ_ДанныеЗаказовКлиента
+ ПО ВТ_РасчетыСКлиентами.АналитикаУчетаПоПартнерам.Партнер = ВТ_ДанныеЗаказовКлиента.Партнер`
3. Dereference of fields in virtual tables
`РегистрНакопления.РасчетыСКлиентами.Обороты(
- &НачалоПериода,
- &КонецПериода,
- ,
- (АналитикаУчетаПоПартнерам.Партнер) В ...`
+ &НачалоПериода,
+ &КонецПериода,
+ ,
+ (АналитикаУчетаПоПартнерам.Партнер) В ...`
4. Dereference in cast function result fields
`ВЫРАЗИТЬ(ВТ_ПланОтгрузок.ДокументПлан КАК Документ.ЗаказКлиента).Валюта.Наценка`
5. Dereference of fields in WHERE section
`ГДЕ азКлиентаТовары.Ссылка.Дата МЕЖДУ &НачалоПериода И &КонецПериода`
+
+
+
## Sources
+
Source: [Dereference of composite type reference fields in the query language (RU)] (https://its.1c.ru/db/v8std/content/654/hdoc)
diff --git a/docs/en/diagnostics/QueryParseError.md b/docs/en/diagnostics/QueryParseError.md
index dec72ea8cc9..b40de22200e 100644
--- a/docs/en/diagnostics/QueryParseError.md
+++ b/docs/en/diagnostics/QueryParseError.md
@@ -1,8 +1,7 @@
# Query text parsing error (QueryParseError)
-## Description
-
+## Diagnostics description
When writing queries, you must follow the following rule: the query text must be opened by the query designer.
@@ -22,7 +21,7 @@ Text = "SELECT
| Catalog.Goods КАК Goods";
```
-Correct
+Right
```bsl
Text = "SELECT
diff --git a/docs/en/diagnostics/QueryToMissingMetadata.md b/docs/en/diagnostics/QueryToMissingMetadata.md
index 86bef8fd7b1..5f15f4e0656 100644
--- a/docs/en/diagnostics/QueryToMissingMetadata.md
+++ b/docs/en/diagnostics/QueryToMissingMetadata.md
@@ -1,12 +1,11 @@
# Using non-existent metadata in the query (QueryToMissingMetadata)
-## Description
+## Diagnostics description
-Due to frequent changes to the metadata model, queries may appear that refer to renamed or deleted metadata.
-Also, errors can occur when you manually change queries, without checking with the query designer.
+Due to frequent changes to the metadata model, queries may appear that refer to renamed or deleted metadata. Also, errors can occur when you manually change queries, without checking with the query designer.
-When accessing non-existent metadata in a query, a runtime error will occur.
+Executing queries against non-existent metadata will generate a runtime error.
## Examples
@@ -22,17 +21,17 @@ Query with a join to the renamed register:
SELECT
Table.Field1 AS Field1
FROM
- InformationRegister.InfoReg AS Table
- INNER JOIN InformationRegister.InfoRegOld AS FilterTable
- ON FilterTable.Field2 = Table.Field2
+ InformationRegister.InfoReg AS Table
+ INNER JOIN InformationRegister.InfoRegOld AS FilterTable
+ ON FilterTable.Field2 = Table.Field2
```
## Sources
-- [Development standards. Working with queries (RU)](https://its.1c.ru/db/v8std#browse:13:-1:26:27)
-- [Development standards. Optimizing queries (RU)](https://its.1c.ru/db/v8std#browse:13:-1:26:28)
+- [Working with queries - 1C development standards (RU)](https://its.1c.ru/db/v8std#browse:13:-1:26:27)
+- [Optimization of queries - 1C development standards (RU)](https://its.1c.ru/db/v8std#browse:13:-1:26:28)
diff --git a/docs/en/diagnostics/RefOveruse.md b/docs/en/diagnostics/RefOveruse.md
index 6ca1a197208..fca1c486e8e 100644
--- a/docs/en/diagnostics/RefOveruse.md
+++ b/docs/en/diagnostics/RefOveruse.md
@@ -16,7 +16,7 @@ Query.Text = "Select Files.File.Ref, // error
-* Useful Information: [Dereferencing Complex Type Reference Fields in Query Language (RU)](https://its.1c.ru/db/v8std/content/654/hdoc)
+* Useful Information: [Dereferencing Complex Type Reference Fields in Query Language](https://its.1c.ru/db/v8std/content/654/hdoc)
diff --git a/docs/en/diagnostics/ReservedParameterNames.md b/docs/en/diagnostics/ReservedParameterNames.md
index 50a783d844b..e4749544f7e 100644
--- a/docs/en/diagnostics/ReservedParameterNames.md
+++ b/docs/en/diagnostics/ReservedParameterNames.md
@@ -1,22 +1,21 @@
# Reserved parameter names (ReservedParameterNames)
-## Description
+## Description
If a parameter name matches one of a system enumeration's name, then all values of that enumeration will not be available in the local context.
Module code's syntax checking will not detect an error. To prevent this situation, a parameter name should not match all names of system enumerations.
-
-Parameter names should not contain reserved words such as system enumerations.
The list of reserved words is set by a regular expression.
-The search is case-insensitive.
+Поиск производится без учета регистра символов.
**For example:**
-"FormGroupType|FormFieldType"
+"ВидГруппыФормы|ВидПоляФормы"
## Sources
+
-* Source: [Standard: Procedure and Function Parameters (RU)](https://its.1c.ru/db/v8std/content/640/hdoc)
-* Source: [Standard: Rules for generating variable names (RU)](https://its.1c.ru/db/v8std#content:454:hdoc)
+- Source: [Standard: Procedure and Function Parameters (RU)](https://its.1c.ru/db/v8std/content/640/hdoc)
+- Source: [Standard: Rules for generating variable names (RU)](https://its.1c.ru/db/v8std#content:454:hdoc)
diff --git a/docs/en/diagnostics/RewriteMethodParameter.md b/docs/en/diagnostics/RewriteMethodParameter.md
index 27128fc7cc9..0e2ae610240 100644
--- a/docs/en/diagnostics/RewriteMethodParameter.md
+++ b/docs/en/diagnostics/RewriteMethodParameter.md
@@ -1,44 +1,55 @@
# Rewrite method parameter (RewriteMethodParameter)
+
## Description
+
-It is wrong to write methods in which their arguments are overwritten immediately on entry.
-It is necessary to correct this deficiency by removing the parameters, converting them to local variables.
+Иногда разработчик пишут функции таким образом, когда аргументы функции перезаписываются сразу на входе в функцию/процедуру.
+
+Такое поведение вводит в заблуждение других разработчиков, которые вызывают подобные функции/процедуры.
+Эти функции нужно исправить. It is necessary to correct this deficiency by removing the parameters, converting them to local variables.
## Examples
+
+
Suspicious code
+
```bsl
-Procedure Configor(Val ConnectionString, Val User = "", Val Pass = "") Export
- ConnectionString = "/F""" + DataBaseDir + """"; // Error
+Функция Конфигуратор(Знач СтрокаПодключения, Знач Пользователь = "", Знач Пароль = "") Экспорт
+ СтрокаПодключения = "/F""" + КаталогБазы + """"; // Здесь
...
-EndProcedure
+КонецФункции
```
-Сorrected:
+Исправленный код
+
```bsl
-Procedure Configor(Val DataBaseDir, Val User = "", Val Pass = "") Export
-ConnectionString = "/F""" + DataBaseDir + """"; // No error
+Функция Конфигуратор(Знач КаталогБазы, Знач Пользователь = "", Знач Пароль = "") Экспорт
+ СтрокаПодключения = "/F""" + КаталогБазы + """"; // Здесь
...
-EndProcedure
+КонецФункции
```
+
or
-```bsl
-Procedure Configor(Val DataBaseDir, Val User = "", Val Pass = "") Export
- If Not EmpyString(DataBaseDir) Then
-NewConnectionString = "/F""" + DataBaseDir + """";
-Else
-NewConnectionString = ConnectionString; // Hmm, where is this from?
-EndIf;
+```bsl
+Функция Конфигуратор(Знач КаталогБазы, Знач Пользователь = "", Знач Пароль = "") Экспорт
+ Если Не ПустаяСтрока(КаталогБазы) Тогда
+ НоваяСтрокаПодключения = "/F""" + КаталогБазы + """";
+ Иначе
+ НоваяСтрокаПодключения = СтрокаПодключения;
+ КонецЕсли;
...
-EndProcedure
+КонецФункции
```
## Sources
+
+
-## Description
-
+## Diagnostics description
For child metadata objects, such as attributes, dimensions, resources, tabular sections (and their attributes), it is not recommended to use names that match the names of the owner objects, since this can lead to errors in queries.
diff --git a/docs/en/diagnostics/ScheduledJobHandler.md b/docs/en/diagnostics/ScheduledJobHandler.md
index 002e40b5061..9390e5da614 100644
--- a/docs/en/diagnostics/ScheduledJobHandler.md
+++ b/docs/en/diagnostics/ScheduledJobHandler.md
@@ -1,8 +1,11 @@
# Scheduled job handler (ScheduledJobHandler)
+
## Description
+
+
Certain requirements are imposed on the methods of scheduled job handlers.
Any export procedure or function of a non-global common server module can be used as a scheduled job method. If the scheduled job method is a function, then its return value is ignored.
@@ -10,6 +13,7 @@ If the scheduled job is predefined, then its handler should not have parameters.
Otherwise, the parameters of such a scheduled job can be any values that are allowed to be sent to the server. The parameters of a scheduled job must exactly match the parameters of the procedure or function it calls.
Diagnostics checks the following signs of the correctness of the scheduled job handler method:
+
- there is a common module and a shared module method specified as a handler
- common module is server
- the method is export
@@ -18,14 +22,18 @@ Diagnostics checks the following signs of the correctness of the scheduled job h
- there are no other scheduled jobs that refer to the same handler method
## Examples
+
## Sources
+
+
+
- [Set of articles "Scheduled job" - standard 1C (RU)](https://its.1c.ru/db/v8std#browse:13:-1:1:6)
- [Article "Scheduled job" from the developer's guide 1C 8.3 (RU)](https://its.1c.ru/db/v8322doc#bookmark:dev:TI000000794)
diff --git a/docs/en/diagnostics/SelectTopWithoutOrderBy.md b/docs/en/diagnostics/SelectTopWithoutOrderBy.md
index 6f1b805398a..88465a47739 100644
--- a/docs/en/diagnostics/SelectTopWithoutOrderBy.md
+++ b/docs/en/diagnostics/SelectTopWithoutOrderBy.md
@@ -66,4 +66,4 @@ SORT BY
* Полезная информация: [Отказ от использования модальных окон](https://its.1c.ru/db/metod8dev#content:5272:hdoc)
* Источник: [Cognitive complexity, ver. 1.4](https://www.sonarsource.com/docs/CognitiveComplexity.pdf) -->
-- [Standard: Ordering Query Results (RU)](https://its.1c.ru/db/v8std#content:412:hdoc)
+- [Standard: Ordering Query Results](https://its.1c.ru/db/v8std#content:412:hdoc)
diff --git a/docs/en/diagnostics/SelfInsertion.md b/docs/en/diagnostics/SelfInsertion.md
index 33b27ef0181..1351496303c 100644
--- a/docs/en/diagnostics/SelfInsertion.md
+++ b/docs/en/diagnostics/SelfInsertion.md
@@ -7,4 +7,4 @@ Inserting a collection into itself results in circular references.
## Sources
-* [Search for circular links (RU)](https://its.1c.ru/db/metod8dev#content:5859:hdoc)
+* [Search for circular links](https://its.1c.ru/db/metod8dev#content:5859:hdoc)
diff --git a/docs/en/diagnostics/ServerCallsInFormEvents.md b/docs/en/diagnostics/ServerCallsInFormEvents.md
index fd1e8ee20a3..55000433b1c 100644
--- a/docs/en/diagnostics/ServerCallsInFormEvents.md
+++ b/docs/en/diagnostics/ServerCallsInFormEvents.md
@@ -1,7 +1,9 @@
# Server calls in form events (ServerCallsInFormEvents)
+
## Description
+
Events `OnActivateRow` and `OnStartChoice` should not contain server procedure calls. These events should only execute on the client.
@@ -11,6 +13,7 @@ Only server calls to methods of this form are diagnosed; calling MyModuleServer.
According to the [Infostart article](https://infostart.ru/1c/articles/1225834/), calling server procedures from these events can lead to performance issues and form behavior problems.
## Examples
+
### Incorrect
@@ -39,7 +42,8 @@ EndProcedure
```
## Sources
+
-* [GitHub Issue #3473](https://github.com/1c-syntax/bsl-language-server/issues/3473)
-* [Infostart: Server calls that should not be called](https://infostart.ru/1c/articles/1225834/)
+- [GitHub Issue #3473](https://github.com/1c-syntax/bsl-language-server/issues/3473)
+- [Infostart: Server calls that should not be called](https://infostart.ru/1c/articles/1225834/)
diff --git a/docs/en/diagnostics/ServerSideExportFormMethod.md b/docs/en/diagnostics/ServerSideExportFormMethod.md
index 478e3f60df2..e86ff094608 100644
--- a/docs/en/diagnostics/ServerSideExportFormMethod.md
+++ b/docs/en/diagnostics/ServerSideExportFormMethod.md
@@ -1,7 +1,7 @@
# Server-side export form method (ServerSideExportFormMethod)
-## Description
+## Diagnostics description
In a form module, you can declare export methods that are available in the client context (usually, these are form notification event handlers). For export methods of the form, only the compilation directive `AtClient` can be specified, since for the rest there is no practical sense: accessing form methods from outside is available only after calling the method `GetForm`, which is available only on the client.
diff --git a/docs/en/diagnostics/SetPermissionsForNewObjects.md b/docs/en/diagnostics/SetPermissionsForNewObjects.md
index 83db92cccc7..65cb78ca3c5 100644
--- a/docs/en/diagnostics/SetPermissionsForNewObjects.md
+++ b/docs/en/diagnostics/SetPermissionsForNewObjects.md
@@ -1,4 +1,4 @@
-# The check box «Set permissions for new objects» should only be selected for the FullAccess role (SetPermissionsForNewObjects)
+# The checkbox «Set permissions for new objects» should only be selected for the FullAccess role (SetPermissionsForNewObjects)
## Description
@@ -9,4 +9,4 @@ When adding a new role, the "Set permissions for new objects" attribute may be s
## Sources
-* [Standard: Setting rights for new objects and object fields (RU)](https://its.1c.ru/db/v8std/content/532/hdoc)
+* [Standard: Setting rights for new objects and object fields](https://its.1c.ru/db/v8std/content/532/hdoc)
diff --git a/docs/en/diagnostics/SetPrivilegedMode.md b/docs/en/diagnostics/SetPrivilegedMode.md
index 7477af6fa95..4a2361e529e 100644
--- a/docs/en/diagnostics/SetPrivilegedMode.md
+++ b/docs/en/diagnostics/SetPrivilegedMode.md
@@ -1,8 +1,11 @@
# Using privileged mode (SetPrivilegedMode)
+
## Description
+
+
Diagnostic finds Privileged mode setup code.
For external code, such as code from external reports/data processors, this action may not be safe.
@@ -14,6 +17,7 @@ call to `SetPrivilegedMode(False)` is ignored
Any export procedures and functions that perform any actions on the server with the privileged mode set unconditionally beforehand are potentially dangerous, as this disables checking the access rights of the current user. The export procedures and functions of the client API of the 1C:Enterprise server require special attention.
For example, wrong:
+
```bsl
Procedure ChangeData(...) Export
@@ -22,7 +26,9 @@ SetPrivilegedMode(True); // Disable permission check
...
EndProcedure
```
+
Correct:
+
```bsl
Procedure ChangeData(...) Export
@@ -31,11 +37,13 @@ Procedure ChangeData(...) Export
...
EndProcedure
```
+
The exception is when the action performed by the procedure must be allowed (or the return value of the function must be available) to absolutely all categories of users.
If you still need to use privileged mode within a method, you must use manual access control using the `VerifyAccessRights` method.
An example of pre-checking before performing actions in privileged mode:
+
```bsl
Procedure ChangeData(...) Export
@@ -46,23 +54,30 @@ SetPrivilegedMode(True); // Disable permission check
...
EndProcedure
```
+
## Examples
+
+
```bsl
- SetPrivilegedMode(True); // error
+ УстановитьПривилегированныйРежим(Истина); // есть замечание
- Value = True;
- SetPrivilegedMode(Value); // error
+ Значение = Истина;
+ УстановитьПривилегированныйРежим(Значение); // есть замечание
- SetPrivilegedMode(False); // no error
+ УстановитьПривилегированныйРежим(Ложь); // нет замечания
```
+
## Sources
+
+
-* Standard: [Using Privileged Mode (RU)](https://its.1c.ru/db/v8std/content/485/hdoc)
-* Standard: [Server API Security (RU)](https://its.1c.ru/db/v8std#content:678:hdoc)
-* Standard: [Restriction on the execution of "external" code (RU)](https://its.1c.ru/db/v8std/content/669/hdoc)
+
+- Standard: [Using Privileged Mode (RU)](https://its.1c.ru/db/v8std/content/485/hdoc)
+- Standard: [Server API Security (RU)](https://its.1c.ru/db/v8std#content:678:hdoc)
+- Standard: [Restriction on the execution of "external" code (RU)](https://its.1c.ru/db/v8std/content/669/hdoc)
diff --git a/docs/en/diagnostics/SeveralCompilerDirectives.md b/docs/en/diagnostics/SeveralCompilerDirectives.md
index 2160a68edc2..1d4a3abfa7a 100644
--- a/docs/en/diagnostics/SeveralCompilerDirectives.md
+++ b/docs/en/diagnostics/SeveralCompilerDirectives.md
@@ -7,7 +7,7 @@ It is an error to specify multiple compilation directives to a module method or
## Examples
-Incorrect:
+Wrong
```bsl
&AtServer
diff --git a/docs/en/diagnostics/SpaceAtStartComment.md b/docs/en/diagnostics/SpaceAtStartComment.md
index fcef2f921ed..5a0f43ab0e8 100644
--- a/docs/en/diagnostics/SpaceAtStartComment.md
+++ b/docs/en/diagnostics/SpaceAtStartComment.md
@@ -9,4 +9,4 @@ Exception from the rule is _**comments-annotations**_, comments starting with sp
## Sources
-* Source: [Standard: Modules (RU)](https://its.1c.ru/db/v8std#content:456:hdoc)
+* [Standard: Modules text, Item 7.3](https://its.1c.ru/db/v8std#content:456:hdoc)
diff --git a/docs/en/diagnostics/StyleElementConstructors.md b/docs/en/diagnostics/StyleElementConstructors.md
index 28403669462..f9aaf84e602 100644
--- a/docs/en/diagnostics/StyleElementConstructors.md
+++ b/docs/en/diagnostics/StyleElementConstructors.md
@@ -15,4 +15,4 @@ Types of style elements:
## Sources
System of standards
-* Source: [Standard: Style Elements (RU)](https://its.1c.ru/db/v8std#content:667:hdoc)
+* Source: [Standard: Style Elements](https://its.1c.ru/db/v8std#content:667:hdoc)
diff --git a/docs/en/diagnostics/TempFilesDir.md b/docs/en/diagnostics/TempFilesDir.md
index 3ae4ff5c9b6..c2d776cbcbd 100644
--- a/docs/en/diagnostics/TempFilesDir.md
+++ b/docs/en/diagnostics/TempFilesDir.md
@@ -9,7 +9,7 @@ If a temporary file name is generated otherwise, and the application code fails
## Examples
-Incorrect:
+Wrong:
```bsl
Catalog = TempFilesDir();
@@ -27,7 +27,7 @@ Data.Write(TempFile);
To create a temporary directory, it is recommended to use the one obtained by the GetTempFileName method (with the exception of the web client).
-Incorrect:
+Wrong:
```bsl
ArchFile = New ZipFileReader(FileName);
diff --git a/docs/en/diagnostics/TernaryOperatorUsage.md b/docs/en/diagnostics/TernaryOperatorUsage.md
index 646c37564c4..45b6fb3f7ef 100644
--- a/docs/en/diagnostics/TernaryOperatorUsage.md
+++ b/docs/en/diagnostics/TernaryOperatorUsage.md
@@ -31,13 +31,13 @@ Bad:
```bsl
If ?(P.Emp_emptype = Null, 0, P.Emp_emptype) = 0 Then
- Status = "Done";
+ Status = "Done";
EndIf;
```
Good:
```bsl
If P.Emp_emptype = Null OR P.Emp_emptype = 0 Then
- Status = "Done";
+ Status = "Done";
End If;
```
diff --git a/docs/en/diagnostics/TimeoutsInExternalResources.md b/docs/en/diagnostics/TimeoutsInExternalResources.md
index 8c331a4c841..4bc7a1172f8 100644
--- a/docs/en/diagnostics/TimeoutsInExternalResources.md
+++ b/docs/en/diagnostics/TimeoutsInExternalResources.md
@@ -40,7 +40,7 @@ ConnectiomTimeout = 180;
HTTPConnection = New HTTPConnection("zabbix.localhost", 80,,,, ConnectiomTimeout);
```
-## Sources
+## Reference
-* [Timeouts when working with external resources (RU)](https://its.1c.ru/db/v8std#content:748:hdoc)
-* [InternetMail Profilehas a default timeout (RU)](https://its.1c.ru/db/metod8dev/content/2358/hdoc)
+* [Timeouts when working with external resources](https://its.1c.ru/db/v8std#content:748:hdoc)
+* [InternetMail Profilehas a default timeout](https://its.1c.ru/db/metod8dev/content/2358/hdoc)
diff --git a/docs/en/diagnostics/TransferringParametersBetweenClientAndServer.md b/docs/en/diagnostics/TransferringParametersBetweenClientAndServer.md
index 4f9d19fe9e8..48fc79c3537 100644
--- a/docs/en/diagnostics/TransferringParametersBetweenClientAndServer.md
+++ b/docs/en/diagnostics/TransferringParametersBetweenClientAndServer.md
@@ -1,12 +1,14 @@
# Transferring parameters between the client and the server (TransferringParametersBetweenClientAndServer)
+
## Description
+
+
When transferring control from the client to the server (and vice versa), copies of the parameters are always transferred.
- When a server procedure or function is called from the client, a copy of the actual parameter is created and this copy is passed to the server side.
-
- When control is returned from the server to the client, a copy of the formal parameter (which was handled in the called procedure or function) is also created for transfer back to the client.
If a formal parameter is specified with the Val modifier, then the value of the parameter will only be passed when the procedure or function is called and will not be passed back when control returns to the client.
@@ -20,10 +22,12 @@ As a result, the absence of the Val modifier in client-server interaction can le
The current rule finds server methods that execute from client methods and throws remarks on parameters without the Val modifier that are not set to a value.
-## Examples
-
-
+## Examples
+
+
+
1. An example with passing parameters from the client to the server without "Val" and with "Val"
+
```bsl
&AtServerNoContext
Procedure TransferParametersToServer(Param1, Val ParamWithVal, Collection, Val CollectionWithVal)
@@ -55,51 +59,54 @@ Message(StrTemplate(Template, "CollectionWithVal.Key2", CollectionWithVal.Key2))
EndProcedure
```
+
This code, when executed, will show the following result
+
```
after server Param1=
by default | Minutes
to fix | Tags |
-|:-------:|:-----:|:----------:|:-----------------------------:|:------------------------:|:---------------:|
-| `Error` | `BSL` | `Critical` | `Yes` | `5` | `unpredictable` |
-
## Diagnostics description
@@ -31,7 +22,7 @@ For command bar buttons associated with the "Data" property with a standard dyna
- [General requirements - Standards 1C (RU)](https://its.1c.ru/db/v8std#content:467:hdoc)
diff --git a/docs/en/diagnostics/WrongHttpServiceHandler.md b/docs/en/diagnostics/WrongHttpServiceHandler.md
index e7546a5d673..73430bab921 100644
--- a/docs/en/diagnostics/WrongHttpServiceHandler.md
+++ b/docs/en/diagnostics/WrongHttpServiceHandler.md
@@ -1,13 +1,13 @@
# Missing handler for http service (WrongHttpServiceHandler)
-## Description
+## Diagnostics description
-If there is no http-service method handler, then the call to the operation will return neither data, nor errors on the client side of the service, nor errors on the side of the service itself.
+In the absence of a http service operation handler, a call to this method will not give out either the data itself, or an error on the client side of the service, or an error on the side of the service itself.
-Important: the http service method should only accept one parameter.
+It is important to remember that the http service method should only accept one parameter.
-The configurator notices violations only when the "Check for the existence of assigned handlers" flag is enabled.
+The configurator notices violations of the specified restrictions only when the "Check for the existence of assigned handlers" flag is enabled.
## Examples
@@ -21,14 +21,14 @@ EndFunction
Correct handler method - only one parameter is specified and there is a method body
```bsl
Function StorageGETRequest(Request)
- Return ModuleRequests.Get(Request);
+ Return Requests.Getter(Request);
EndFunction
```
Invalid handler method with the wrong number of parameters
```bsl
-Function StorageGETRequest(Request, Additional)
- Return ModuleRequests.Get(Request);
+Function StorageGETRequest(Request, Additionals)
+ Return Requests.Getter(Request);
EndFunction
```
@@ -36,8 +36,8 @@ EndFunction
-* [Developers guide 8.3.20. Internet service mechanisms (RU)](https://its.1c.ru/db/v8320doc#bookmark:dev:TI000000783)
-* [Configuration guidelines. Web services and HTTP services (RU)](https://its.1c.ru/db/metod8dev/browse/13/-1/1989/2565/2567/2590)
+* [Developer Guide 8.3.20 - Web service mechanisms (RU)](https://its.1c.ru/db/v8320doc#bookmark:dev:TI000000783)
+* [Web-services and HTTP-services - recommendations from 1C](https://its.1c.ru/db/metod8dev/browse/13/-1/1989/2565/2567/2590)
diff --git a/docs/en/diagnostics/WrongUseFunctionProceedWithCall.md b/docs/en/diagnostics/WrongUseFunctionProceedWithCall.md
index 425182c1cdc..5f857f04673 100644
--- a/docs/en/diagnostics/WrongUseFunctionProceedWithCall.md
+++ b/docs/en/diagnostics/WrongUseFunctionProceedWithCall.md
@@ -12,14 +12,11 @@ Using the `ProceedWithCall` function outside of extension methods with the `&Aro
```bsl
&AtClient
Procedure Test()
-
- // copy-past from extension
- ProceedWithCall(); // Срабатывание здесь
-
+ ProceedWithCall(); // there is error
EndProcedure
```
## Sources
-Source: [Extensions. Functionality -> Modules (RU)](https://its.1c.ru/db/pubextensions#content:54:1)
+Source: [Extensions. Functionality -> Modules](https://its.1c.ru/db/pubextensions#content:54:1)
diff --git a/docs/en/diagnostics/WrongUseOfRollbackTransactionMethod.md b/docs/en/diagnostics/WrongUseOfRollbackTransactionMethod.md
index beba0e343b4..0caa065fb52 100644
--- a/docs/en/diagnostics/WrongUseOfRollbackTransactionMethod.md
+++ b/docs/en/diagnostics/WrongUseOfRollbackTransactionMethod.md
@@ -23,4 +23,4 @@ EndTry;
## Sources
-[Transactions: Rules of Use (RU)](https://its.1c.ru/db/v8std/content/783/hdoc/_top/)
+Standard: [Transactions: rules of use](https://its.1c.ru/db/v8std#content:783:hdoc:_top)
diff --git a/docs/en/diagnostics/WrongWebServiceHandler.md b/docs/en/diagnostics/WrongWebServiceHandler.md
index 9d9db46950e..2fe39c773ec 100644
--- a/docs/en/diagnostics/WrongWebServiceHandler.md
+++ b/docs/en/diagnostics/WrongWebServiceHandler.md
@@ -1,13 +1,13 @@
# Wrong handler for web service (WrongWebServiceHandler)
-## Description
+## Diagnostics description
-If there is no web-service operation handler, then the call to the operation will return neither data, nor errors on the client side of the service, nor errors on the side of the service itself.
+In the absence of a web service operation handler, a call to this operation will not give out either the data itself, or an error on the client side of the service, or an error on the side of the service itself.
It is important to remember: the number of parameters of the web service operation method must match the number of parameters specified in the settings of the web service operation.
-The configurator notices violations only when the "Check for the existence of assigned handlers" flag is enabled.
+The configurator notices violations of the specified restrictions only when the "Check for the existence of assigned handlers" flag is enabled.
## Examples
@@ -21,14 +21,14 @@ EndFunction
Correct handler method - there is a method body and the correct set of parameters is specified
```bsl
Function FillCatalogs(MobileDeviceID, MessageExchange)
- Return MobileOrders.FillCatalogs(MobileDeviceID, MessageExchange);
+ Return Mobiles.LoadCatalogs(MobileDeviceID, MessageExchange);
EndFunction
```
Invalid handler method with the wrong number of parameters
```bsl
-Function FillCatalogs(MobileDeviceID, MessageExchange, Additional)
-Return MobileOrders.FillCatalogs(MobileDeviceID, MessageExchange);
+Function FillCatalogs(MobileDeviceID, MessageExchange, Additionals)
+ Return Mobiles.LoadCatlogs(MobileDeviceID, MessageExchange);
EndFunction
```
@@ -36,8 +36,8 @@ EndFunction
-* [Developers guide 8.3.20. Internet service mechanisms (RU)](https://its.1c.ru/db/v8320doc#bookmark:dev:TI000000783)
-* [Configuration guidelines. Web services and HTTP services (RU)](https://its.1c.ru/db/metod8dev/browse/13/-1/1989/2565/2567/2590)
+* [Developer Guide 8.3.20 - Web service mechanisms (RU)](https://its.1c.ru/db/v8320doc#bookmark:dev:TI000000783)
+* [Web-services and HTTP-services - recommendations from 1C](https://its.1c.ru/db/metod8dev/browse/13/-1/1989/2565/2567/2590)
diff --git a/docs/en/diagnostics/YoLetterUsage.md b/docs/en/diagnostics/YoLetterUsage.md
index 4c4a1f7429f..69ad659bdc4 100644
--- a/docs/en/diagnostics/YoLetterUsage.md
+++ b/docs/en/diagnostics/YoLetterUsage.md
@@ -7,4 +7,4 @@ In code it is prohibited to use character "yo" ("ё"). Exception is interface te
## Sources
-* Source: [Standard: Modules (RU)](https://its.1c.ru/db/v8std#content:456:hdoc)
+* [Standard: Modules texts (RU)](https://its.1c.ru/db/v8std#content:456:hdoc)
diff --git a/docs/en/features/ConfigurationFile.md b/docs/en/features/ConfigurationFile.md
index b644f953683..92ff61d91f8 100644
--- a/docs/en/features/ConfigurationFile.md
+++ b/docs/en/features/ConfigurationFile.md
@@ -7,43 +7,43 @@ If there is no configuration file, an attempt will be made to find the ".bsl-lan
## Settings
-| Name | Type | Description |
-|:---------------------------------------------------------------|:--------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `language` | `String` | Set the language for displaying diagnosed comments. Supported languages:
* `ru` - for Russian (*default*)
* `en` - for English |
-| `codeLens` | `JSON-Object` | Contains settings for displaying `lenses` in advanced code/IDEs *(eg [Visual Studio Code](https://code.visualstudio.com/))*, which displays various information above the code block. |
-| ⤷ `parameters` | `JSON-Object` | Collection of lens settings. Collection items are json-objects with the following structure:
* *object key* - string, is lens key
* *object value* - if is boolean, then interpreted as lens off-switch (`false`) or on-switch with default parameters (`true`), if is type `json-object`, collection of lens parameters. |
-| ⤷ `cognitiveComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [cognitive complexity](../diagnostics/CognitiveComplexity.md) of the method over its definition. The default is ` true `. Lens options: `complexityThreshold` - lens response threshold. The default is - `-1`. |
-| ⤷ `cyclomaticComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [cyclomatic complexity](../diagnostics/CyclomaticComplexity.md) of the method over its definition. The default is `true`. Lens options: `complexityThreshold` - lens response threshold. The default is - `-1`. |
-| `diagnostics` | `JSON-Object` | Contains diagnostic settings |
-| ⤷ `computeTrigger` | `String` | Event that will trigger the code analysis procedure to diagnose comments. Possible values:
* `onType` -when editing a file (online) ***on large files can significantly slow down editing ***
* `onSave` - when saving a file (*default*)
`never` - analysis will not be performed |
-| ⤷ `ordinaryAppSupport` | `Boolean` | Ordinary client support. Diagnostics will require taking into account the features of a ordinary application. Values:
* `true` - the configuration uses ordinary application *(default)*
* `false` - ignore ordinary application warnings |
-| ⤷ `skipSupport` | `String` | This parameter sets **1C configuration** file skipping mode *(for example files are not analyzed for issues)* which are "on support" from vendor configuration. Possible values:
* `withSupport` - skip all modules set "on support" *(all "locks" types)*
* `withSupportLocked` - skip modules set "on support" with prohibited modification *("yellow closed lock")*
* `never` - skip no modules as support mode is not analyzed *(set by default)* |
-| ⤷ `mode` | `String` | Setting for controlling the diagnostic settings accounting mode. Possible options:
* `OFF` - All diagnostics are considered to be turned off, regardless of their settings.
* `ON` - All diagnostics enabled by default are considered enabled, the rest - depending on personal settings
* `EXCEPT` - All diagnostics other than those specified are considered enabled.
* `ONLY` - Only the specified diagnostics are considered enabled.
* `ALL` - All diagnostics are considered enabled |
-| ⤷ `parameters` | `JSON-Object` | Parameter is a collection of diagnostics parameters. Collection items are json-objects with the following structure:
* *object key* - string, is diagnostic key
* *object value* - if is boolean, then interpreted as diagnostic off-switch (`false`) or on-switch with default parameters (`true`), if is type `json-object`, collection of diagnostic parameters.
Key, if set to ON by default and all allowed parameters and examples are given on the diagnostic page. |
-| ⤷ `minimumLSPDiagnosticLevel` | `String` | This parameter allows setting a minimum LSP severity level for running diagnostics. Diagnostics with severity level lower than specified will not run. Possible values:
* `Error` - error
* `Warning` - warning
* `Information` - information
* `Hint` - hint
By default, the parameter is not set and all diagnostics run according to other settings. |
-| ⤷ `overrideMinimumLSPDiagnosticLevel` | `String` | This parameter allows setting a minimum severity level for LSP diagnostics. If the diagnostic severity is lower than specified, it will be raised to the specified level. Possible values:
* `Error` - error
* `Warning` - warning
* `Information` - information
* `Hint` - hint
By default, the parameter is not set and diagnostic levels are used according to their definition. |
-| ⤷ `metadata` | `JSON-Object` | Parameter is a collection of diagnostic metadata overrides. Collection items are json-objects with the following structure:
* *object key* - string, is diagnostic key
* *object value* - json-object with diagnostic parameters to override. You can override: `type`, `severity`, `scope`, `modules`, `minutesToFix`, `activatedByDefault`, `compatibilityMode`, `tags`, `canLocateOnProject`, `extraMinForComplexity`, `lspSeverity`.
Values from configuration file override those defined in source code. The `lspSeverity` parameter allows explicitly setting LSP severity level (`Error`, `Warning`, `Information`, `Hint`), if not specified - calculated automatically. |
-| ⤷ `subsystemsFilter` | `JSON-Object` | Filter by configuration subsystems |
-| ⤷ `analyzeOnStart` | `Boolean` | Starting the analysis of the entire project at server startup. If enabled, after the context is built on the client, information about diagnostics in all project files will be sent. |
-| ⤷ `include` | `Array` `String` | List of names of subsystems for which objects the analysis is performed, including child subsystems |
-| ⤷ `exclude` | `Array` `String` | List of names of subsystems excluded from analysis, including child subsystems |
-| `documentLink` | `JSON-Object` | Contains documentation link settings |
-| ⤷ `showDiagnosticDescription` | `Boolean` | Show additional links to diagnostics documentation. By default, the parameter is off (*set to `false`*) |
-| `inlayHint` | `JSON-Object` | ontains settings for displaying `inlay hints` in advanced code editors/IDEs *(for example [Visual Studio Code](https://code.visualstudio.com/))*, which displays various information directly in the code line. |
-| ⤷ `parameters` | `JSON-Object` | A collection of inlay hints settings. The elements of the collection are json objects of the following structure:*
*object key* - a string that is an identifier of inlay hint*
*object value* - can take either a boolean value, and then it is interpreted as disabling inlay hint (`false`) or enabling them with parameters by default (`true`), or a value of type `json-object`, which is a set of inlay hint settings. |
-| ⤷ `cognitiveComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [Cognitive Complexity](../diagnostics/CognitiveComplexity.md) method as inlay hints. By default, the setting is set to `true`. |
-| ⤷ `cyclomaticComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [Cyclomatic Complexity](../diagnostics/CyclomaticComplexity.md) method as inlay hints. By default, the setting is set to `true`. |
-| ⤷ `sourceDefinedMethodCall` | `Boolean` or `JSON-Object` | Enables displaying the parameters of the invoked configuration/library method as inlay hints. By default, the setting is set to `true`. Available parameters:
* `showParametersWithTheSameName` - show parameters with names contained in the passed value. The default parameter value is `false`.
* `showDefaultValues` - show default values for parameters not passed. The default value of the parameter is `true`. |
-| `capabilities` | `JSON-Object` | Settings for LSP capabilities that the server advertises to clients. Use this section to override defaults such as document sync mode. |
-| ⤷ `textDocumentSync` | `JSON-Object` | Settings for text document synchronization. |
-| ⤷ `change` | `String` | Text document sync strategy advertised to the client. Supported values: `Incremental` *(default)*, `Full`, `None`. Changing this value requires restarting BSL Language Server so the new capability is sent to clients. |
-| `useDevSite` | `Boolean` | When you turn on the settings, the resulting documentation links will lead to the develop version of the site. By default, the parameter is off (*set to `false`*) |
-| `siteRoot` | `String` | The path to the root of the site with the documentation. By default, the parameter value is `"https://1c-syntax.github.io/bsl-language-server"` |
-| `traceLog` | `String` | To log all requests *(incoming and outgoing)* between **BSL Language Server** and **Language Client** from used editor/IDE, this parameter sets log file path. The path can set either absolute or relative *(from project root)*, by default the value is not set.
**WARNING**
* When starting **BSL Language Server** overwrites this file
* Speed of interaction between client and server **DRAMATICALLY REDUCED** |
-| `configurationRoot` | `String` | This parameter is intended to indicate the root directory the 1C configuration files are located in the project directory. It can be useful if there are several configuration directories in the same project directory or when the structure of the project directory is so complex. By default, the parameter is empty and `BSL Language Server` determines the location of the configuration root directory independently |
-| `sendErrors` | `String` | Mode for sending error messages to BSL Language Server developers. More [Monitoring](Monitoring.md).Possible values:
* `ask` - ask permission on every error *(set by default)*.
* `send` - always send error messages.
* `never` - never send error messages. |
-| `references` | `JSON-Object` | Contains reference index settings |
-| ⤷ `commonModuleAccessors` | `Array` `String` | List of 'Module.Method' patterns for methods returning common module references (e.g. `CommonUse.CommonModule("ModuleName")`). Supports both format with module name (`CommonUse.CommonModule`) and local call (`CommonModule`). By default, includes standard BSL patterns: `ОбщийМодуль`, `CommonModule`, `ОбщегоНазначения.ОбщийМодуль`, `ОбщегоНазначенияКлиент.ОбщийМодуль`, `ОбщегоНазначенияСервер.ОбщийМодуль`, `ОбщегоНазначенияКлиентСервер.ОбщийМодуль`, `ОбщегоНазначенияПовтИсп.ОбщийМодуль` and their English equivalents. |
+| Name | Type | Description |
+|:-------------------------------------------------------------- |:--------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `language` | `String` | Set the language for displaying diagnosed comments. Supported languages:
* `ru` - for Russian (*default*)
* `en` - for English |
+| `codeLens` | `JSON-Object` | Contains settings for displaying `lenses` in advanced code/IDEs *(eg [Visual Studio Code](https://code.visualstudio.com/))*, which displays various information above the code block. |
+| ⤷ `parameters` | `JSON-Object` | Collection of lens settings. Collection items are json-objects with the following structure:
* *object key* - string, is lens key
* *object value* - if is boolean, then interpreted as lens off-switch (`false`) or on-switch with default parameters (`true`), if is type `json-object`, collection of lens parameters. |
+| ⤷ `cognitiveComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [cognitive complexity](../diagnostics/CognitiveComplexity.md) of the method over its definition. The default is ` true `. Lens options: `complexityThreshold` - lens response threshold. The default is - `-1`. |
+| ⤷ `cyclomaticComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [cyclomatic complexity](../diagnostics/CyclomaticComplexity.md) of the method over its definition. The default is `true`. Lens options: `complexityThreshold` - lens response threshold. The default is - `-1`. |
+| `diagnostics` | `JSON-Object` | Contains diagnostic settings |
+| ⤷ `computeTrigger` | `String` | Event that will trigger the code analysis procedure to diagnose comments. Possible values:
* `onType` -when editing a file (online) ***on large files can significantly slow down editing ***
* `onSave` - when saving a file (*default*)
`never` - analysis will not be performed |
+| ⤷ `ordinaryAppSupport` | `Boolean` | Ordinary client support. Diagnostics will require taking into account the features of a ordinary application. Values:
* `true` - the configuration uses ordinary application *(default)*
* `false` - ignore ordinary application warnings |
+| ⤷ `skipSupport` | `String` | This parameter sets **1C configuration** file skipping mode *(for example files are not analyzed for issues)* which are "on support" from vendor configuration. Possible values:
* `withSupport` - skip all modules set "on support" *(all "locks" types)*
* `withSupportLocked` - skip modules set "on support" with prohibited modification *("yellow closed lock")*
* `never` - skip no modules as support mode is not analyzed *(set by default)* |
+| ⤷ `mode` | `String` | Setting for controlling the diagnostic settings accounting mode. Possible options:
* `OFF` - All diagnostics are considered to be turned off, regardless of their settings.
* `ON` - All diagnostics enabled by default are considered enabled, the rest - depending on personal settings
* `EXCEPT` - All diagnostics other than those specified are considered enabled.
* `ONLY` - Only the specified diagnostics are considered enabled.
* `ALL` - All diagnostics are considered enabled |
+| ⤷ `parameters` | `JSON-Object` | Parameter is a collection of diagnostics parameters. Collection items are json-objects with the following structure:
* *object key* - string, is diagnostic key
* *object value* - if is boolean, then interpreted as diagnostic off-switch (`false`) or on-switch with default parameters (`true`), if is type `json-object`, collection of diagnostic parameters.
Key, if set to ON by default and all allowed parameters and examples are given on the diagnostic page. |
+| ⤷ `minimumLSPDiagnosticLevel` | `String` | This parameter allows setting a minimum LSP severity level for running diagnostics. Diagnostics with severity level lower than specified will not run. Possible values:
* `Error` - error
* `Warning` - warning
* `Information` - information
* `Hint` - hint
By default, the parameter is not set and all diagnostics run according to other settings. |
+| ⤷ `overrideMinimumLSPDiagnosticLevel` | `String` | This parameter allows setting a minimum severity level for LSP diagnostics. If the diagnostic severity is lower than specified, it will be raised to the specified level. Possible values:
* `Error` - error
* `Warning` - warning
* `Information` - information
* `Hint` - hint
By default, the parameter is not set and diagnostic levels are used according to their definition. |
+| ⤷ `metadata` | `JSON-Object` | Parameter is a collection of diagnostic metadata overrides. Collection items are json-objects with the following structure:
* *object key* - string, is diagnostic key
* *object value* - json-object with diagnostic parameters to override. You can override: `type`, `severity`, `scope`, `modules`, `minutesToFix`, `activatedByDefault`, `compatibilityMode`, `tags`, `canLocateOnProject`, `extraMinForComplexity`, `lspSeverity`.
Values from configuration file override those defined in source code. The `lspSeverity` parameter allows explicitly setting LSP severity level (`Error`, `Warning`, `Information`, `Hint`), if not specified - calculated automatically. |
+| ⤷ `subsystemsFilter` | `JSON-Object` | Filter by configuration subsystems |
+| ⤷ `analyzeOnStart` | `Boolean` | Starting the analysis of the entire project at server startup. If enabled, after the context is built on the client, information about diagnostics in all project files will be sent. |
+| ⤷ `include` | `Array` `String` | List of names of subsystems for which objects the analysis is performed, including child subsystems |
+| ⤷ `exclude` | `Array` `String` | List of names of subsystems excluded from analysis, including child subsystems |
+| `documentLink` | `JSON-Object` | Contains documentation link settings |
+| ⤷ `showDiagnosticDescription` | `Boolean` | Show additional links to diagnostics documentation. By default, the parameter is off (*set to `false`*) |
+| `inlayHint` | `JSON-Object` | ontains settings for displaying `inlay hints` in advanced code editors/IDEs *(for example [Visual Studio Code](https://code.visualstudio.com/))*, which displays various information directly in the code line. |
+| ⤷ `parameters` | `JSON-Object` | A collection of inlay hints settings. The elements of the collection are json objects of the following structure:*
*object key* - a string that is an identifier of inlay hint*
*object value* - can take either a boolean value, and then it is interpreted as disabling inlay hint (`false`) or enabling them with parameters by default (`true`), or a value of type `json-object`, which is a set of inlay hint settings. |
+| ⤷ `cognitiveComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [Cognitive Complexity](../diagnostics/CognitiveComplexity.md) method as inlay hints. By default, the setting is set to `true`. |
+| ⤷ `cyclomaticComplexity` | `Boolean` or `JSON-Object` | Enables displaying the value of the [Cyclomatic Complexity](../diagnostics/CyclomaticComplexity.md) method as inlay hints. By default, the setting is set to `true`. |
+| ⤷ `sourceDefinedMethodCall` | `Boolean` or `JSON-Object` | Enables displaying the parameters of the invoked configuration/library method as inlay hints. By default, the setting is set to `true`. Available parameters:
* `showParametersWithTheSameName` - show parameters with names contained in the passed value. The default parameter value is `false`.
* `showDefaultValues` - show default values for parameters not passed. The default value of the parameter is `true`. |
+| `capabilities` | `JSON-Object` | Settings for LSP capabilities that the server advertises to clients. Use this section to override defaults such as document sync mode. |
+| ⤷ `textDocumentSync` | `JSON-Object` | Settings for text document synchronization. |
+| ⤷ `change` | `String` | Text document sync strategy advertised to the client. Supported values: `Incremental` *(default)*, `Full`, `None`. Changing this value requires restarting BSL Language Server so the new capability is sent to clients. |
+| `useDevSite` | `Boolean` | When you turn on the settings, the resulting documentation links will lead to the develop version of the site. By default, the parameter is off (*set to `false`*) |
+| `siteRoot` | `Строка` | The path to the root of the site with the documentation. By default, the parameter value is `"https://1c-syntax.github.io/bsl-language-server"` |
+| `traceLog` | `Строка` | To log all requests *(incoming and outgoing)* between **BSL Language Server** and **Language Client** from used editor/IDE, this parameter sets log file path. The path can set either absolute or relative *(from project root)*, by default the value is not set.
**WARNING**
* When starting **BSL Language Server** overwrites this file
* Speed of interaction between client and server **DRAMATICALLY REDUCED** |
+| `configurationRoot` | `Строка` | This parameter is intended to indicate the root directory the 1C configuration files are located in the project directory. It can be useful if there are several configuration directories in the same project directory or when the structure of the project directory is so complex. By default, the parameter is empty and `BSL Language Server` determines the location of the configuration root directory independently |
+| `sendErrors` | `Строка` | Mode for sending error messages to BSL Language Server developers. Подробнее - на странице [Мониторинг и отправка ошибок](Monitoring.md). More [Monitoring](Monitoring.md).Possible values:
* `ask` - ask permission on every error *(set by default)*.
* `send` - всегда отправлять сообщения об ошибках.
* `send` - always send error messages.
* `never` - never send error messages. |
+| `references` | `JSON-Object` | Contains reference index settings |
+| ⤷ `commonModuleAccessors` | `Array` `String` | List of 'Module.Method' patterns for methods returning common module references (e.g. `CommonUse.CommonModule("ModuleName")`). Supports both format with module name (`CommonUse.CommonModule`) and local call (`CommonModule`). By default, includes standard BSL patterns: `ОбщийМодуль`, `CommonModule`, `ОбщегоНазначения.ОбщийМодуль`, `ОбщегоНазначенияКлиент.ОбщийМодуль`, `ОбщегоНазначенияСервер.ОбщийМодуль`, `ОбщегоНазначенияКлиентСервер.ОбщийМодуль`, `ОбщегоНазначенияПовтИсп.ОбщийМодуль` and their English equivalents. |
You can use the following JSON schema to make it easier to compile and edit a configuration file:
@@ -58,8 +58,7 @@ https://1c-syntax.github.io/bsl-language-server/configuration/schema.json
This example demonstrates filtering diagnostics by LSP severity level:
* Language of diagnostics messages - English;
-* Changes the diagnostic setting [LineLength - Line length limit](../diagnostics/LineLength.md) by setting
- line length limit of 140 characters;
+* Changes the diagnostic setting [LineLength - Line length limit](../diagnostics/LineLength.md) by setting line length limit of 140 characters;
* Disable [MethodSize - Method size restriction diagnostic](../diagnostics/MethodSize.md).
* Filters diagnostics, not running diagnostics with severity level below `Warning` (Information and Hint diagnostics will not run)
@@ -85,8 +84,7 @@ This example demonstrates adjusting diagnostic severity display:
* Language of diagnostics messages - English;
* Enables the calculation of diagnostics in continuous mode (`computeTrigger = onType`)
-* Diagnostics are calculated only for the objects of the "StandardSubsystems" subsystem, with the exception of "ReportVariants" and "
- ObjectVersioning"
+* Diagnostics are calculated only for the objects of the "StandardSubsystems" subsystem, with the exception of "ReportVariants" and " ObjectVersioning"
* Raises the severity level to `Warning` for all running diagnostics (diagnostics with Information or Hint will be displayed as Warning)
* Overrides the diagnostic type `EmptyCodeBlock` to `ERROR` and severity to `BLOCKER`
diff --git a/docs/en/features/Monitoring.md b/docs/en/features/Monitoring.md
index 2bae2d04372..03e714a09c3 100644
--- a/docs/en/features/Monitoring.md
+++ b/docs/en/features/Monitoring.md
@@ -12,18 +12,18 @@ unauthorized users.
In the [configuration file](ConfigurationFile.md) of the BSL Language Server, you can configure the mode for sending error messages.
The send mode can take one of three values:
-* ask (default);
-* send always;
-* never send.
+- ask (default);
+- send always;
+- never send.
If the configuration file is missing a setting or has a value of "ask", when an error occurs
the connected language client (used by the IDE) is sent a question about further actions with an error
with the following answer options:
-* send this error but ask again;
-* don't send this error but ask again.
-* send this error and don't ask again;
-* don't send this error and don't ask again;
+- send this error but ask again;
+- don't send this error but ask again.
+- send this error and don't ask again;
+- don't send this error and don't ask again;
You can completely refuse to answer (for example, by clicking on the cross next to the notification with the question).
Lack of response is perceived as "don't send this error, but ask again".
@@ -40,10 +40,11 @@ Some messages sent between Language Client and BSL Language Server contain sourc
or the entire text of the file.
These fragments can also be attached to the sent message.
-Sending message example:
+Пример отправляемого события об ошибке:
??? event.json
+ ````
```json
{
"event_id": "746e2e82f4c1499abcdd935bc4c26644",
@@ -277,4 +278,5 @@ Sending message example:
"version": "7",
"location": null
}
- ```
\ No newline at end of file
+ ```
+ ````
\ No newline at end of file
diff --git a/docs/en/features/index.md b/docs/en/features/index.md
index 8111df669e6..31099df80f7 100644
--- a/docs/en/features/index.md
+++ b/docs/en/features/index.md
@@ -4,4 +4,4 @@ Additional features BSL Language Server
* [Configuration](ConfigurationFile.md)
* [Diagnostic ignorance](DiagnosticIgnorance.md)
-* [Monitoring](Monitoring.md)
+* [Мониторинг и отправка ошибок](Monitoring.md)
diff --git a/docs/en/index.md b/docs/en/index.md
index e0805483ee5..8b137891791 100644
--- a/docs/en/index.md
+++ b/docs/en/index.md
@@ -1,277 +1 @@
-# BSL Language Server
-[](https://github.com/1c-syntax/bsl-language-server/actions)
-[](https://github.com/1c-syntax/bsl-language-server/releases/latest)
-[](https://github.com/1c-syntax/bsl-language-server/releases)
-[](https://github.com/1c-syntax/bsl-language-server/releases)
-[](https://github.com/1c-syntax/bsl-language-server/releases)
-[](https://sonarcloud.io/dashboard?id=1c-syntax_bsl-language-server)
-[](https://sonarcloud.io/dashboard?id=1c-syntax_bsl-language-server)
-[](https://sonarcloud.io/dashboard?id=1c-syntax_bsl-language-server)
-[](https://www.transifex.com/1c-syntax/bsl-language-server)
-[](bench/index.html)
-[](https://t.me/bsl_language_server)
-
-[Language Server Protocol](https://microsoft.github.io/language-server-protocol/) implementation for 1C (BSL) - 1C:Enterprise 8 and [OneScript](http://oscript.io) languages.
-
-* [Contributing guidelines](contributing/index.md)
-* Capabilities
-* Run from command line
-* Run in websocket mode
-* Run in analyzer mode
-* Run in formatter mode
-* Configuration file
-* Reporters
-* Diagnostics
-* Features
-* [Frequently asked questions](faq.md)
-* [System requirements](systemRequirements.md)
-* Acknowledgments
-
-
-
-Perfomance measurement - [SSL 3.1](../bench/index.html)
-
-## Features
-
-* File formatting
-* Selected region formatting
-* Symbol definition for current file (regions, procedures, functions, variables, defined via `Var` keyword)
-* Folding regions definition `#Region`, `#If`, procedures and functions, code blocks, queries
-* Methods "Cognitive Complexity" and "Cyclomatic Complexity" scores
-* Tooltip on local methods and methods of common / manager modules
-* Go to method definitions
-* Finding places to use methods
-* Method call hierarchy
-* Expand selection
-* Display color representation and convert between `Color` and `WebColors`
-* Diagnostics
-* Quick fixes and code actions for several diagnostics
-* Run diagnostics engine from command line
-* Run formatter engine from command line
-* Renaming Symbols
-
-## Supported protocol operations
-
-??? workspace
- | Operation | Support | Comment |
- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
- | [didChangeWorkspaceFolders](https://microsoft.github.io/language-server-protocol/specification-current#workspace_didChangeWorkspaceFolders) | | |
- | [didChangeConfiguration](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeConfiguration) |
| with restrictions see [#1431](https://github.com/1c-syntax/bsl-language-server/issues/1431) |
- | [didChangeWatchedFiles](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles) |
| |
- | [symbol](https://microsoft.github.io/language-server-protocol/specification#workspace_symbol) |
| |
- | [executeCommand](https://microsoft.github.io/language-server-protocol/specification#workspace_executeCommand) |
| |
- | [diagnostic/refresh](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_diagnostic_refresh) |
| sent on configuration change |
- | [applyEdit](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_applyEdit) |
| |
- | [willCreateFiles](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_willCreateFiles) |
| |
-
-??? "Text Synchronization"
- | Operation | Supported | Comment |
- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
- | [didOpen](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didOpen) |
| | |
- | [didChange](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didChange) |
| textDocumentSyncKind = Incremental | |
- | [didClose](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didClose) |
| | |
- | [didSave](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave) |
| | |
- | [willSave](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_willSave) |
| | |
- | [willSaveWaitUntil](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_willSaveWaitUntil) |
| | |
-
-??? textDocument
- | Operation | Support | Commentary | Is configured? |
- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------------- |
- | [publishDiagnostics](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_publishDiagnostics) |
| tagSupport = true
versionSupport = true
[diagnostics](./diagnostics/index.md) | yes |
- | [diagnostic](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_diagnostic) | | interFileDependencies = true
workspaceDiagnostics = false | no |
- | [completion](https://github.com/1c-syntax/bsl-language-server/blob/develop/docs/diagnostics/index.md) | | resolveProvider = false | |
- | [completionItem/resolve](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#completionItem_resolve) |
| | |
- | [hover](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover) |
| contentFormat = MarkupContent | |
- | [signatureHelp](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_signatureHelp) |
| | |
- | [declaration](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_declaration) |
| not applicable in 1C:Enterprise | |
- | [definition](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition) |
| linkSupport = true | |
- | [typeDefinition](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_typeDefinition) |
| | |
- | [implementation](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_implementation) |
| not applicable in 1C:Enterprise | |
- | [references](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references) |
| | |
- | [documentHighlight](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentHighlight) |
| | |
- | [documentSymbol](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol) |
| hierarchicalDocumentSymbolSupport = true | |
- | [codeAction](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction) |
| codeActionKinds = ? (см. [#1433](https://github.com/1c-syntax/bsl-language-server/issues/1433))
isPreferredSupport = true | yes |
- | [codeAction/resolve](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#codeAction_resolve) | | | |
- | [codeLens](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeLens) |
| resolveProvider = false | yes |
- | [codeLens/resolve](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#codeLens_resolve) |
| | |
- | [codeLens/refresh](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#codeLens_refresh) |
| | |
- | [documentLink](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentLink) |
| Showing hyperlinks to documentation on diagnostics.
tooltipSupport = true
resolveProvider = false | yes |
- | [documentLink/resolve](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#documentLink_resolve) | | | |
- | [documentColor](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentColor) |
| | |
- | [colorPresentation](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_colorPresentation) |
| | |
- | [formatting](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_formatting) |
| | |
- | [rangeFormatting](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rangeFormatting) |
| | |
- | [onTypeFormatting](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_onTypeFormatting) |
| | |
- | [rename](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rename) |
| | |
- | [prepareRename](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_prepareRename) |
| | |
- | [foldingRange](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_foldingRange) |
| | |
- | [selectionRange](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_selectionRange) |
| | |
- | [prepareCallHierarchy](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_prepareCallHierarchy) |
| | |
- | [callHierarchy/incomingCalls](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#callHierarchy_incomingCalls) |
| | |
- | [callHierarchy/outgoingCalls](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#callHierarchy_outgoingCalls) |
| | |
- | [semanticTokens/full](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens) |
| multilineTokenSupport = true | |
- | [semanticTokens/full/delta](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens) |
| | |
- | [semanticTokens/range](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens) |
| | |
- | [linkedEditingRange](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_linkedEditingRange) |
| | |
- | [moniker](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_moniker) |
| | |
- | [inlayHint](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint) |
| resolveProvider = false | yes |
- | [inlayHint/resolve](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#inlayHint_resolve) |
| | |
- | [inlayHint/refresh](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_inlayHint_refresh) |
| | |
-
-
-
-## Run from command line
-
-jar-files run through `java -jar path/to/file.jar`.
-
-```sh
-java -jar bsl-language-server.jar --help
-
-BSL language server
-Usage: bsl-language-server [-h] [-c=