-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into develop
- Loading branch information
Showing
6 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Restriction on using of the obsolete method "Message" | ||
|
||
To display messages to the user in all cases, you should use the MessageUser object, even when the message is not “bound” to some form control. The Message method should not be used. | ||
|
||
*When used the Standard Subsystems Library it is recommended use procedure MessageUser from common module CommonPurposeClientServer, which use object UserMessage.* | ||
|
||
Refference: [Standard: Limit use of the obsolete method Message](https://its.1c.ru/db/v8std#content:418:hdoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Limit on the number of property values passed to the structure constructor | ||
|
||
When creating an object of type Structure it is not recommended to pass more than 3 property values to the constructor. Instead, it is recommended to use the Insert method or assign values to properties explicitly. | ||
|
||
#### Example | ||
|
||
Incorrect: | ||
|
||
```bsl | ||
ПараметрыФормыКомпоновки = Новый Структура( | ||
"НеПомещатьНастройкиВСхемуКомпоновкиДанных, | ||
|НеРедактироватьСхемуКомпоновкиДанных, | ||
|НеНастраиватьУсловноеОформление, | ||
|НеНастраиватьВыбор, | ||
|НеНастраиватьПорядок, | ||
|АдресСхемыКомпоновкиДанных, | ||
|АдресНастроекКомпоновкиДанных, | ||
|УникальныйИдентификатор, | ||
|Заголовок", | ||
Истина, | ||
Истина, | ||
Истина, | ||
Истина, | ||
Истина, | ||
ТекущиеДанные.АдресСхемыКомпоновкиДанных, | ||
?(АдресНастроекСхемыКомпоновкиДанных <> Неопределено, | ||
АдресНастроекСхемыКомпоновкиДанных, | ||
ТекущиеДанные.АдресНастроекСхемыКомпоновкиДанных), | ||
УникальныйИдентификатор, | ||
ЗаголовокФормыНастройкиСхемыКомпоновкиДанных)); | ||
``` | ||
|
||
Correct: | ||
|
||
```bsl | ||
ПараметрыФормыКомпоновки = Новый Структура; | ||
ПараметрыФормыКомпоновки.Вставить("НеПомещатьНастройкиВСхемуКомпоновкиДанных", Истина); | ||
ПараметрыФормыКомпоновки.Вставить("НеРедактироватьСхемуКомпоновкиДанных", Истина); | ||
ПараметрыФормыКомпоновки.Вставить("НеРедактироватьСхемуКомпоновкиДанных", Истина); | ||
ПараметрыФормыКомпоновки.Вставить("НеНастраиватьВыбор", Истина); | ||
ПараметрыФормыКомпоновки.Вставить("НеНастраиватьПорядок", Истина); | ||
ПараметрыФормыКомпоновки.Вставить("АдресСхемыКомпоновкиДанных", ТекущиеДанные.АдресСхемыКомпоновкиДанных); | ||
ПараметрыФормыКомпоновки.Вставить("АдресНастроекКомпоновкиДанных", ?(АдресНастроекСхемыКомпоновкиДанных <> Неопределено, | ||
АдресНастроекСхемыКомпоновкиДанных, | ||
ТекущиеДанные.АдресНастроекСхемыКомпоновкиДанных)); | ||
ПараметрыФормыКомпоновки.Вставить("УникальныйИдентификатор ", УникальныйИдентификатор); | ||
ПараметрыФормыКомпоновки.Вставить("Заголовок", ЗаголовокФормыНастройкиСхемыКомпоновкиДанных); | ||
``` | ||
|
||
Reference: [Стандарт: Использование объектов типа Структура](https://its.1c.ru/db/v8std#content:693:hdoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Using FindByName and FindByCode | ||
|
||
- **Scope:** BSL (BSL only) | ||
- **Type:** CODE_SMELL | ||
- **Criticality:** MAJOR | ||
|
||
The diagnostic finds use of methods FindByName and FindByCode with hardcoded values. | ||
|
||
Example: | ||
|
||
```bsl | ||
Должность = Справочники.Должности.НайтиПоНаименованию("Ведущий бухгалтер"); | ||
``` | ||
|
||
or | ||
|
||
```bsl | ||
Должность = Справочники.Должности.НайтиПоКоду("00-0000001"); | ||
``` | ||
|
||
Acceptable use: | ||
|
||
```bsl | ||
Справочники.Валюты.НайтиПоКоду(ТекущиеДанные.КодВалютыЦифровой); | ||
``` | ||
|
||
```bsl | ||
Справочники.КлассификаторБанков.НайтиПоКоду(СведенияОБанке.БИК); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Using service tags | ||
|
||
The diagnostic finds use of service tags in comments. Tags list: | ||
|
||
- TODO | ||
- FIXME | ||
|
||
Tags list can be extended via options. | ||
|
||
## Parameters | ||
|
||
- `serviceTags` - `String` - keyword for search. Bu default : "todo|fixme". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters