1
0
mirror of https://github.com/1C-Company/v8-code-style.git synced 2025-03-04 08:08:18 +02:00

Merge pull request #1 from 1C-Company/master

update the fork repo
This commit is contained in:
olgabozhko 2022-04-18 23:08:31 +07:00 committed by GitHub
commit 472338d408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
87 changed files with 711 additions and 129 deletions

View File

@ -2,6 +2,42 @@
[TOC text bullet hierarchy]
## 0.3.0
### Новые фичи
### Новые проверки
#### Метаданные
- Длина синонима раздела верхнего уровня, отображаемого в интерфейсе, не должна превышать 35 символов
#### Формы
#### Код модулей
#### Запросы
#### Права ролей
### Новые быстрые исправления (Quick-fix)
### Исправленные ошибки
## 0.2.0
@ -24,8 +60,6 @@
- Клиентский общий модуль с повторно используемыми значениями должен именоваться с постфиксом "КлиентПовтИсп"
- Общий модуль ВызовСервера с повторно используемыми значениями должен именоваться с постфиксом "ВызовСервераПовтИсп"
#### Формы
#### Код модулей
- Использован метод "РольДоступна()"
@ -53,10 +87,6 @@
- Для проверок dynamic-access-method-not-found и property-return-type добавлена возможность исключения по типам (COM-Объекты)
- Проверка типов invocation-parameter-type-intersect проверяет типы элементов коллекций: Массив, Соотвествие, СписокЗначений
#### Запросы
#### Права ролей
### Новые быстрые исправления (Quick-fix)
- Удаление аннотации строгой типизации из модуля

View File

@ -36,6 +36,7 @@
| Версия | P2-репозиторий | ZIP-архив репозитория |
|--------|----------------|-----------------------|
| 0.3.0 для 1C:EDT 2022.1 | https://edt.1c.ru/downloads/releases/plugins/v8-code-style/edt-2022.1/0.3.0/repo/ | https://edt.1c.ru/downloads/releases/plugins/v8-code-style/edt-2022.1/0.3.0/repo.zip |
| 0.2.0 для 1C:EDT 2021.3 | https://edt.1c.ru/downloads/releases/plugins/v8-code-style/edt-2021.3/0.2.0/repo/ | https://edt.1c.ru/downloads/releases/plugins/v8-code-style/edt-2021.3/0.2.0/repo.zip |
| 0.1.0 для 1C:EDT 2021.2 | https://edt.1c.ru/downloads/releases/plugins/v8-code-style/edt-2021.2/0.1.0/repo/ | https://edt.1c.ru/downloads/releases/plugins/v8-code-style/edt-2021.2/0.1.0/repo.zip |

View File

@ -18,7 +18,7 @@
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bom</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>BOM</name>
@ -104,7 +104,7 @@
<artifact>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>default</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</artifact>
</target>
<environments>

View File

@ -12,9 +12,9 @@
# 1C-Soft LLC - initial API and implementation
#*******************************************************************************
current_version='0.1.0'
new_version='0.2.0'
next_version='0.3.0'
current_version='0.2.0'
new_version='0.3.0'
next_version='0.4.0'
find . -name 'pom.xml' -exec sed -i '' "s/${current_version}-SNAPSHOT/${new_version}-SNAPSHOT/g" {} +

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.autosort.ui;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.autosort.ui.UiPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui;bundle-version="[3.118.0,4.0.0)",
@ -18,6 +18,6 @@ Import-Package: com._1c.g5.v8.dt.common;version="[6.0.0,7.0.0)",
com._1c.g5.v8.dt.metadata.mdclass;version="[8.0.0,9.0.0)",
com._1c.g5.wiring;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)",
com.e1c.v8codestyle.autosort;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.autosort;version="[0.3.0,0.4.0)",
com.google.common.base;version="[27.0.0,28.0.0)",
com.google.inject;version="[1.3.0,2.0.0)"

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.autosort.ui</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.autosort;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.autosort.AutoSortPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.13.0,4.0.0)",
@ -26,11 +26,11 @@ Import-Package: com._1c.g5.v8.bm.common.collections;version="[3.0.0,4.0.0)",
com._1c.g5.v8.dt.core.platform;version="[10.0.0,11.0.0)",
com._1c.g5.v8.dt.lifecycle;version="[3.0.0,4.0.0)",
com._1c.g5.v8.dt.metadata.mdclass;version="[8.0.0,9.0.0)",
com.e1c.v8codestyle;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle;version="[0.3.0,0.4.0)",
com.google.common.base;version="[27.1.0,28.0.0)",
com.google.inject;version="[1.3.0,2.0.0)",
com.google.inject.binder;version="[1.3.0,2.0.0)"
Export-Package: com.e1c.v8codestyle.autosort;version="0.2.0";
Export-Package: com.e1c.v8codestyle.autosort;version="0.3.0";
uses:="org.eclipse.emf.ecore,
org.eclipse.core.runtime,
org.eclipse.emf.common.util,

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.autosort</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -13,7 +13,7 @@
###############################################################################
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
AutoSortProjectOptionProvider_description = Позволяет автоматически сортировать верхенуровневые объекты метаданных конфигурации при добавлении нового или переименовании существующего.
AutoSortProjectOptionProvider_description = Позволяет автоматически сортировать верхнеуровневые объекты метаданных конфигурации при добавлении нового или переименовании существующего.
AutoSortProjectOptionProvider_presentation = Авто-сортировка верхнеуровневых объектов конфигурации

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.bsl.ui;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.bsl.ui.UiPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
@ -50,6 +50,6 @@ Import-Package: com._1c.g5.ides.ui.texteditor.xtext.embedded;version="[5.0.0,6.0
com.e1c.g5.v8.dt.check.qfix;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[2.0.0,3.0.0)",
com.e1c.v8codestyle.bsl;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.bsl.qfix.external;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.bsl.strict;version="[0.2.0,0.3.0)"
com.e1c.v8codestyle.bsl;version="[0.3.0,0.4.0)",
com.e1c.v8codestyle.bsl.qfix.external;version="[0.3.0,0.4.0)",
com.e1c.v8codestyle.bsl.strict;version="[0.3.0,0.4.0)"

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.bsl.ui</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.bsl;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.bsl.BslPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@ -57,8 +57,8 @@ Import-Package: com._1c.g5.v8.bm.core;version="[7.0.0,8.0.0)",
com.e1c.g5.v8.dt.check.qfix;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.qfix.components;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[2.0.0,3.0.0)",
com.e1c.v8codestyle;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.check;version="[0.2.0,0.3.0)"
Export-Package: com.e1c.v8codestyle.bsl;version="0.2.0",
com.e1c.v8codestyle.bsl.qfix.external;version="0.2.0",
com.e1c.v8codestyle.bsl.strict;version="0.2.0"
com.e1c.v8codestyle;version="[0.3.0,0.4.0)",
com.e1c.v8codestyle.check;version="[0.3.0,0.4.0)"
Export-Package: com.e1c.v8codestyle.bsl;version="0.3.0",
com.e1c.v8codestyle.bsl.qfix.external;version="0.3.0",
com.e1c.v8codestyle.bsl.strict;version="0.3.0"

View File

@ -19,10 +19,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.bsl</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.form;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.form.CorePlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.20.0,4.0.0)",
@ -24,6 +24,6 @@ Import-Package: com._1c.g5.v8.bm.core;version="[7.5.0,8.0.0)",
com.e1c.g5.v8.dt.check;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[2.0.0,3.0.0)",
com.e1c.v8codestyle.check;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.check;version="[0.3.0,0.4.0)",
com.google.common.base;version="[27.1.0,28.0.0)",
com.google.inject;version="[1.3.0,2.0.0)"

View File

@ -18,10 +18,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.form</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.md.ui;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.md.ui.UiPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.ui;bundle-version="[3.119.0,4.0.0)",
@ -26,6 +26,6 @@ Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)",
com._1c.g5.v8.dt.ui.wizards;version="[8.0.0,9.0.0)",
com._1c.g5.wiring;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)",
com.e1c.v8codestyle.md;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.md;version="[0.3.0,0.4.0)",
com.google.common.base;version="[27.0.0,28.0.0)",
com.google.inject;version="[1.3.0,2.0.0)"

View File

@ -18,10 +18,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.md.ui</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.md;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.md.CorePlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
@ -26,7 +26,7 @@ Import-Package: com._1c.g5.v8.bm.core;version="[7.0.0,8.0.0)",
com.e1c.g5.v8.dt.check.context;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.ext;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[2.0.0,3.0.0)",
com.e1c.v8codestyle.check;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.check;version="[0.3.0,0.4.0)",
com.google.common.base;version="[27.0.0,28.0.0)",
com.google.inject;version="[1.3.0,2.0.0)"
Export-Package: com.e1c.v8codestyle.md;version="0.2.0"
Export-Package: com.e1c.v8codestyle.md;version="0.3.0"

View File

@ -0,0 +1,12 @@
# Длина названия раздела превышает 35 символов
Общая длина названия раздела не должна превышать 35 знаков с учетом пробелов (это позволяет разместить название в 2 строки, при дальнейшем увеличении количества знаков появится многоточие). Лучше выбирать названия примерно одного размеры по ширине, чтобы они смотрелись единообразно и ровно.
## Неправильно
## Правильно
## См.
- [Инструкции по разработке на 1С - Панель разделов, пункт 2.1](https://its.1c.ru/db/v8std#content:712:hdoc)

View File

@ -0,0 +1,13 @@
# Section name is more then 35 characters long
Section names must not exceed 35 characters including spaces. The names can take two lines. If you increase the number of characters, an ellipsis is added. We recommend that you choose names of the same length to make them look consistently.
## Noncompliant Code Example
## Compliant Solution
## See
- [1Ci Support - Sections panel, section 2.1](https://support.1ci.com/hc/en-us/articles/360011003580-Sections-panel#:~:text=2.1)
- [Knowledge base - Sections panel](https://1c-dn.com/library/user_manual_taxi_interface_sections_panel/)

View File

@ -78,6 +78,10 @@
category="com.e1c.v8codestyle.md"
class="com.e1c.v8codestyle.internal.md.ExecutableExtensionFactory:com.e1c.v8codestyle.md.check.CommonModuleNameServerCallCachedCheck">
</check>
<check
category="com.e1c.v8codestyle.md"
class="com.e1c.v8codestyle.md.check.SubsystemSynonymTooLongCheck">
</check>
</extension>
</plugin>

View File

@ -18,10 +18,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.md</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>

View File

@ -59,6 +59,11 @@ final class Messages
public static String MdScheduledJobPeriodicityCheck_The_minimum_job_interval_is_less_then_minute;
public static String MdScheduledJobPeriodicityCheck_title;
public static String MdScheduledJobPeriodicityCheck_Minimum_job_interval_description;
public static String SubsystemSynonymTooLongCheck_description;
public static String SubsystemSynonymTooLongCheck_Exclude_languages_comma_separated;
public static String SubsystemSynonymTooLongCheck_Length_of_section_name_more_than_symbols_for_language;
public static String SubsystemSynonymTooLongCheck_Maximum_section_name_length;
public static String SubsystemSynonymTooLongCheck_title;
static
{
// initialize resource bundle

View File

@ -0,0 +1,126 @@
/*******************************************************************************
* Copyright (C) 2022, 1C-Soft LLC and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* 1C-Soft LLC - initial API and implementation
* Denis Maslennikov - issue #37
*******************************************************************************/
package com.e1c.v8codestyle.md.check;
import static com._1c.g5.v8.dt.metadata.mdclass.MdClassPackage.Literals.MD_OBJECT__SYNONYM;
import static com._1c.g5.v8.dt.metadata.mdclass.MdClassPackage.Literals.SUBSYSTEM;
import static com._1c.g5.v8.dt.metadata.mdclass.MdClassPackage.Literals.SUBSYSTEM__INCLUDE_IN_COMMAND_INTERFACE;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.util.EMap;
import com._1c.g5.v8.dt.metadata.mdclass.MdObject;
import com._1c.g5.v8.dt.metadata.mdclass.Subsystem;
import com.e1c.g5.v8.dt.check.CheckComplexity;
import com.e1c.g5.v8.dt.check.ICheckParameters;
import com.e1c.g5.v8.dt.check.components.BasicCheck;
import com.e1c.g5.v8.dt.check.components.TopObjectFilterExtension;
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
import com.e1c.g5.v8.dt.check.settings.IssueType;
/**
* Check top subsystem synonym length that should be less then 35 by default or value
* of the parameter MAX_SUBSYSTEM_SYNONYM_LENGTH, if it is set.
*
* @author Denis Maslennikov
*/
public class SubsystemSynonymTooLongCheck
extends BasicCheck
{
private static final String CHECK_ID = "subsystem-synonym-too-long"; //$NON-NLS-1$
public static final String MAX_SUBSYSTEM_SYNONYM_LENGTH = "maxSubsystemSynonymLength"; //$NON-NLS-1$
public static final String MAX_SUBSYSTEM_SYNONYM_DEFAULT = "35"; //$NON-NLS-1$
public static final String SUBSYSTEM_SYNONYM_LANGS_FILTER = "subsystemSynonymLangFilter"; //$NON-NLS-1$
public static final String SUBSYSTEM_SYNONYM_LANGS_DEFAULT = ""; //$NON-NLS-1$
private static final String LANG_DELIMITER = ","; //$NON-NLS-1$
@Override
public String getCheckId()
{
return CHECK_ID;
}
@Override
protected void configureCheck(CheckConfigurer builder)
{
builder.title(Messages.SubsystemSynonymTooLongCheck_title)
.description(Messages.SubsystemSynonymTooLongCheck_description)
.complexity(CheckComplexity.NORMAL)
.severity(IssueSeverity.MINOR)
.extension(new TopObjectFilterExtension())
.issueType(IssueType.UI_STYLE)
.topObject(SUBSYSTEM)
.checkTop()
.features(MD_OBJECT__SYNONYM, SUBSYSTEM__INCLUDE_IN_COMMAND_INTERFACE)
.parameter(MAX_SUBSYSTEM_SYNONYM_LENGTH, Integer.class, MAX_SUBSYSTEM_SYNONYM_DEFAULT,
Messages.SubsystemSynonymTooLongCheck_Maximum_section_name_length)
.parameter(SUBSYSTEM_SYNONYM_LANGS_FILTER, String.class, SUBSYSTEM_SYNONYM_LANGS_DEFAULT,
Messages.SubsystemSynonymTooLongCheck_Exclude_languages_comma_separated);
}
@Override
protected void check(Object object, ResultAcceptor resultAceptor, ICheckParameters parameters,
IProgressMonitor monitor)
{
if (!(object instanceof MdObject) || monitor.isCanceled())
{
return;
}
Subsystem subsystem = (Subsystem)object;
// Check subsystem is not top-level and included to command interface
if (subsystem.getParentSubsystem() != null || !subsystem.isIncludeInCommandInterface())
{
return;
}
int max = parameters.getInt(MAX_SUBSYSTEM_SYNONYM_LENGTH);
if (max <= 0)
{
return;
}
List<String> excludeLangs =
Arrays.asList(parameters.getString(SUBSYSTEM_SYNONYM_LANGS_FILTER).split(LANG_DELIMITER));
excludeLangs.replaceAll(String::trim);
EMap<String, String> synonyms = subsystem.getSynonym();
for (Map.Entry<String, String> entry : synonyms.entrySet())
{
String key = entry.getKey();
if (!excludeLangs.contains(key))
{
String name = entry.getValue();
if (name != null && name.length() > max)
{
resultAceptor.addIssue(MessageFormat.format(
Messages.SubsystemSynonymTooLongCheck_Length_of_section_name_more_than_symbols_for_language,
name.length(), max, key), MD_OBJECT__SYNONYM);
}
}
}
}
}

View File

@ -17,6 +17,12 @@ CommonModuleNameGlobal_message = Global common module should end with "{0}" suff
CommonModuleNameGlobal_title = Global common module should end with Global suffix
CommonModuleNameServerCallPostfixCheck_0 = Common module should end with {0}
CommonModuleNameServerCallPostfixCheck_Common_module_name_description = Common module should end with correct postfix
CommonModuleNameServerCallPostfixCheck_Common_module_postfix_title = Common module should end with correct postfix
CommonModuleType_description = Common module has incorrect type
CommonModuleType_message = Common module for type "{0}" has incorrect settings: {1}
@ -29,12 +35,6 @@ ConfigurationDataLock_message = Application should use managed data lock mode
ConfigurationDataLock_title = Configuration data lock mode
CommonModuleNameServerCallPostfixCheck_0=Common module should end with {0}
CommonModuleNameServerCallPostfixCheck_Common_module_name_description=Common module should end with correct postfix
CommonModuleNameServerCallPostfixCheck_Common_module_postfix_title=Common module should end with correct postfix
MdListObjectPresentationCheck_Neither_Object_presentation_nor_List_presentation_is_not_filled = Neither Object presentation nor List presentation is not filled
MdListObjectPresentationCheck_decription = Neither Object presentation nor List presentation is not filled
@ -72,3 +72,13 @@ MdScheduledJobPeriodicityCheck_The_minimum_job_interval_is_less_then_minute = Th
MdScheduledJobPeriodicityCheck_description = The minimum job interval is less then {0}s
MdScheduledJobPeriodicityCheck_title = The minimum job interval is less then {0}s
SubsystemSynonymTooLongCheck_Exclude_languages_comma_separated = Exclude languages (codes, comma-separated)
SubsystemSynonymTooLongCheck_Length_of_section_name_more_than_symbols_for_language = Length of section synonym "{0}" more than {1} symbols for language {2}
SubsystemSynonymTooLongCheck_Maximum_section_name_length = Maximum section name length
SubsystemSynonymTooLongCheck_description = Section name is more then 35 characters long
SubsystemSynonymTooLongCheck_title = Section name is more then 35 characters long

View File

@ -18,6 +18,12 @@ CommonModuleNameGlobal_message = Глобальный общий модуль д
CommonModuleNameGlobal_title = Глобальный общий модуль должен оканчиваться на суффикс Глобальный
CommonModuleNameServerCallPostfixCheck_0 = Общий модуль должен именоваться с постфиксом {0}
CommonModuleNameServerCallPostfixCheck_Common_module_name_description = Общий модуль должен именоваться с постфиксом
CommonModuleNameServerCallPostfixCheck_Common_module_postfix_title = Общий модуль должен именоваться с постфиксом
CommonModuleType_description = Общий модуль имеет некорректный тип
CommonModuleType_message = Общий модуль для типа "{0}" имеет некорректне настройки: {1}
@ -30,12 +36,6 @@ ConfigurationDataLock_message = Приложение должно использ
ConfigurationDataLock_title = Режим блокировки данных конфигурации
CommonModuleNameServerCallPostfixCheck_0 = Общий модуль должен именоваться с постфиксом {0}
CommonModuleNameServerCallPostfixCheck_Common_module_name_description=Общий модуль должен именоваться с постфиксом
CommonModuleNameServerCallPostfixCheck_Common_module_postfix_title=Общий модуль должен именоваться с постфиксом
MdListObjectPresentationCheck_Neither_Object_presentation_nor_List_presentation_is_not_filled = Не заполнено ни представление объекта, ни представление списка
MdListObjectPresentationCheck_decription = Не заполнено ни представление объекта, ни представление списка
@ -66,10 +66,20 @@ MdScheduledJobDescriptionCheck_message = Задано наименование
MdScheduledJobDescriptionCheck_title = Задано наименование предопределенного регламентного задания
MdScheduledJobPeriodicityCheck_Minimum_job_interval_description = Минимальный интервал выполнения
MdScheduledJobPeriodicityCheck_The_minimum_job_interval_is_less_then_minute = Периодичность выполнения регламентного задания меньше {0}сек
MdScheduledJobPeriodicityCheck_description = Периодичность выполнения регламентного задания меньше {0}сек
MdScheduledJobPeriodicityCheck_title = Периодичность выполнения регламентного задания меньше {0}сек
MdScheduledJobPeriodicityCheck_Minimum_job_interval_description = Минимальный интервал выполнения
SubsystemSynonymTooLongCheck_Exclude_languages_comma_separated = Исключить языки (коды, разделенных запятыми)
SubsystemSynonymTooLongCheck_Length_of_section_name_more_than_symbols_for_language = Длина синонима раздела "{0}" превышает {1} символов для языка {2}
SubsystemSynonymTooLongCheck_Maximum_section_name_length = Максимальная длина названия раздела верхнего уровня
SubsystemSynonymTooLongCheck_description = Длина названия раздела превышает 35 символов
SubsystemSynonymTooLongCheck_title = Длина названия раздела превышает 35 символов

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.ql;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.ql.CorePlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
@ -27,5 +27,5 @@ Import-Package: com._1c.g5.v8.bm.core;version="[7.0.0,8.0.0)",
com.e1c.g5.v8.dt.check.components;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.settings;version="1.0.0",
com.e1c.g5.v8.dt.ql.check;version="[1.0.0,2.0.0)",
com.e1c.v8codestyle.check;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.check;version="[0.3.0,0.4.0)",
com.google.inject;version="[1.3.0,2.0.0)"

View File

@ -18,10 +18,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.ql</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.right;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.right.CorePlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.18.0,4.0.0)",
@ -30,5 +30,5 @@ Import-Package: com._1c.g5.v8.bm.core;version="[7.0.0,8.0.0)",
com.e1c.g5.v8.dt.check.context;version="[2.0.0,3.0.0)",
com.e1c.g5.v8.dt.check.ext;version="[1.0.0,2.0.0)",
com.e1c.g5.v8.dt.check.settings;version="[2.0.0,3.0.0)",
com.e1c.v8codestyle.check;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle.check;version="[0.3.0,0.4.0)",
com.google.inject;version="[1.3.0,2.0.0)"

View File

@ -18,10 +18,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.right</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.ui;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.ui.UiPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@ -22,5 +22,5 @@ Import-Package: com._1c.g5.v8.dt.common;version="[6.4.0,7.0.0)",
com._1c.g5.v8.dt.ui.wizards;version="[8.1.0,9.0.0)",
com._1c.g5.wiring;version="[2.2.0,3.0.0)",
com._1c.g5.wiring.binder;version="[1.1.0,2.0.0)",
com.e1c.v8codestyle;version="[0.2.0,0.3.0)",
com.e1c.v8codestyle;version="[0.3.0,0.4.0)",
com.google.inject;version="[1.3.0,2.0.0)"

View File

@ -18,10 +18,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.ui</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Activator: com.e1c.v8codestyle.internal.CorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@ -21,5 +21,5 @@ Import-Package: com._1c.g5.v8.bm.core;version="[7.0.0,8.0.0)",
com.e1c.g5.v8.dt.check.settings;version="1.0.0",
com.google.inject;version="[1.3.0,2.0.0)",
com.google.inject.binder;version="[1.3.0,2.0.0)"
Export-Package: com.e1c.v8codestyle;version="0.2.0",
com.e1c.v8codestyle.check;version="0.2.0"
Export-Package: com.e1c.v8codestyle;version="0.3.0",
com.e1c.v8codestyle.check;version="0.3.0"

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bundles</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

View File

@ -12,7 +12,7 @@
###############################################################################
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
CommonChecksProjectOptionProvider_description = Проверки правильного проектирвоания, кодирования, применение "лучших практик" и т.д, не регламентированные стандартами 1С.
CommonChecksProjectOptionProvider_description = Проверки правильного проектирования, кодирования, применение "лучших практик" и т.д, не регламентированные стандартами 1С.
CommonChecksProjectOptionProvider_presentation = Все общие проверки стиля кодирования

View File

@ -14,7 +14,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<groupId>com.e1c.v8codestyle</groupId>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.docs;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Automatic-Module-Name: com.e1c.v8codestyle.docs
Bundle-RequiredExecutionEnvironment: JavaSE-11

View File

@ -20,10 +20,10 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.docs</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<groupId>com.e1c.v8codestyle</groupId>
<packaging>eclipse-plugin</packaging>

View File

@ -14,7 +14,7 @@
<feature
id="com.e1c.v8codestyle.feature"
label="%feature.name"
version="0.2.0.qualifier"
version="0.3.0.qualifier"
provider-name="%feature.vendor"
plugin="com.e1c.v8codestyle"
license-feature="org.eclipse.license"

View File

@ -19,11 +19,11 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>features</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.feature</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>

View File

@ -14,7 +14,7 @@
<feature
id="com.e1c.v8codestyle.sdk"
label="%featureName"
version="0.2.0.qualifier"
version="0.3.0.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="2.0.2.qualifier">
@ -33,11 +33,11 @@
<includes
id="com.e1c.v8codestyle.feature.source"
version="0.2.0.qualifier"
version="0.3.0.qualifier"
optional="true"/>
<includes
id="com.e1c.v8codestyle.feature"
version="0.2.0.qualifier"/>
version="0.3.0.qualifier"/>
</feature>

View File

@ -18,7 +18,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>features</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.sdk</artifactId>

View File

@ -16,7 +16,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>features</artifactId>

View File

@ -16,13 +16,13 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>bom</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<relativePath>./bom/pom.xml</relativePath>
</parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>1C:Code style V8</name>

View File

@ -19,7 +19,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>repositories</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.repository.sdk</artifactId>

View File

@ -19,7 +19,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>repositories</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.repository</artifactId>

View File

@ -16,7 +16,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>repositories</artifactId>

View File

@ -19,12 +19,12 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>targets</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>default</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-target-definition</packaging>

View File

@ -19,7 +19,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>targets</artifactId>

View File

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.autosort.itests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.autosort;bundle-version="[0.2.0,0.3.0)"
Fragment-Host: com.e1c.v8codestyle.autosort;bundle-version="[0.3.0,0.4.0)"
Automatic-Module-Name: com.e1c.v8codestyle.autosort.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: fragment

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>tests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.autosort.itests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>

View File

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.bsl.itests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.bsl;bundle-version="[0.2.0,0.3.0)"
Fragment-Host: com.e1c.v8codestyle.bsl;bundle-version="[0.3.0,0.4.0)"
Automatic-Module-Name: com.e1c.v8codestyle.md.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: fragment

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>tests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.bsl.itests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>

View File

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.bsl.ui.itests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.bsl.ui;bundle-version="[0.2.0,0.3.0)"
Fragment-Host: com.e1c.v8codestyle.bsl.ui;bundle-version="[0.3.0,0.4.0)"
Automatic-Module-Name: com.e1c.v8codestyle.bsl.ui.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: fragment

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>tests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.bsl.ui.itests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>

View File

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.form.itests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.form;bundle-version="[0.2.0,0.3.0)"
Fragment-Host: com.e1c.v8codestyle.form;bundle-version="[0.3.0,0.4.0)"
Automatic-Module-Name: com.e1c.v8codestyle.form.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: fragment

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>tests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.form.itests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>

View File

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.md.itests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.md;bundle-version="[0.2.0,0.3.0)"
Fragment-Host: com.e1c.v8codestyle.md;bundle-version="[0.3.0,0.4.0)"
Automatic-Module-Name: com.e1c.v8codestyle.md.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: fragment

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>tests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.md.itests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>

View File

@ -0,0 +1,144 @@
/*******************************************************************************
* Copyright (C) 2022, 1C-Soft LLC and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* 1C-Soft LLC - initial API and implementation
* Denis Maslennikov- issue #37
*******************************************************************************/
package com.e1c.v8codestyle.md.check.itests;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.util.Arrays;
import org.junit.Test;
import com._1c.g5.v8.bm.core.IBmObject;
import com._1c.g5.v8.dt.core.platform.IDtProject;
import com._1c.g5.v8.dt.metadata.mdclass.Subsystem;
import com._1c.g5.v8.dt.validation.marker.Marker;
import com.e1c.g5.v8.dt.check.settings.CheckUid;
import com.e1c.g5.v8.dt.testing.check.CheckTestBase;
import com.e1c.v8codestyle.md.check.SubsystemSynonymTooLongCheck;
/**
* Tests for {@link SubsystemSynonymTooLongCheck} class
*
* @author Denis Maslennikov
*/
public class SubsystemSynonymTooLongCheckTest
extends CheckTestBase
{
private static final String CHECK_ID = "subsystem-synonym-too-long"; //$NON-NLS-1$
private static final String PROJECT_NAME = "SubsystemSynonymTooLong";
private boolean cuid(String checkId, IDtProject dtProject)
{
CheckUid checkUid = checkRepository.getUidForShortUid(checkId, dtProject);
return checkUid != null && CHECK_ID.equals(checkUid.getCheckId());
}
private long countMarkers(IDtProject dtProject, IBmObject object)
{
return Arrays.asList(markerManager.getMarkers(dtProject.getWorkspaceProject(), object.bmGetId()))
.stream()
.filter(marker -> cuid(marker.getCheckId(), dtProject))
.count();
}
/**
* Test that top-level subsystem has two markers when it included to command interface,
* synonym lengths for languages "ru", "en", "de" is more than maximal length.
* Note: "de" is set as excluded filter.
*
* @throws Exception the exception
*/
@Test
public void testSubsystemSynonymTooLongRuEnDe() throws Exception
{
IDtProject dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
assertNotNull(dtProject);
IBmObject object = getTopObjectByFqn("Subsystem.TopLongRuEnDeIncluded", dtProject);
if (object instanceof Subsystem)
{
assertEquals(countMarkers(dtProject, object), 2);
}
}
/**
* Test that top-level subsystem has one markers when it included to command interface,
* synonym length for language "en" is more than maximal length.
*
* @throws Exception the exception
*/
@Test
public void testSubsystemSynonymTooLongEn() throws Exception
{
IDtProject dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
assertNotNull(dtProject);
IBmObject object = getTopObjectByFqn("Subsystem.TopLongEnIncluded", dtProject);
if (object instanceof Subsystem)
{
assertEquals(countMarkers(dtProject, object), 1);
}
}
/**
* Test that the subsystem does not have marker, but it included to command interface,
* synonym length only for for language "de" is more than maximal length.
* Note: "de" is set as excluded filter.
*
* @throws Exception the exception
*/
@Test
public void testSubsystemSynonymTooLongIgnoreDe() throws Exception
{
IDtProject dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
assertNotNull(dtProject);
long id = getTopObjectIdByFqn("Subsystem.TopLongDeIncluded", dtProject);
Marker marker = getFirstMarker(CHECK_ID, id, dtProject);
assertNull(marker);
}
/**
* Test that the subsystem does not have marker in the following cases:
* - subsystem is top-level, synonym length for all languages is less than maximal length;
* - subsystem is not top-level, synonym length for "en" is more than maximal length;
* - subsystem in not included in command interface;
*
* @throws Exception the exception
*/
@Test
public void testSubsystemSynonymTooLongIgnore() throws Exception
{
IDtProject dtProject = openProjectAndWaitForValidationFinish(PROJECT_NAME);
assertNotNull(dtProject);
long id = getTopObjectIdByFqn("Subsystem.TopShortEnRuDe", dtProject);
Marker marker = getFirstMarker(CHECK_ID, id, dtProject);
assertNull(marker);
id = getTopObjectIdByFqn("Subsystem.TopLongEnIncluded.Subsystem.SubLong", dtProject);
marker = getFirstMarker(CHECK_ID, id, dtProject);
assertNull(marker);
id = getTopObjectIdByFqn("Subsystem.TopLongNotIncluded", dtProject);
marker = getFirstMarker(CHECK_ID, id, dtProject);
assertNull(marker);
}
}

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>SubsystemSynonymTooLong</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>com._1c.g5.v8.dt.core.V8ConfigurationNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,10 @@
{
"version": 1,
"settings": {
"subsystem-synonym-too-long": {
"properties": {
"subsystemSynonymLangFilter": " de"
}
}
}
}

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
topObjects=true

View File

@ -0,0 +1,3 @@
addModuleStrictTypesAnnotation=false
createModuleStructure=false
eclipse.preferences.version=1

View File

@ -0,0 +1,3 @@
commonChecks=true
eclipse.preferences.version=1
standardChecks=true

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1,2 @@
Manifest-Version: 1.0
Runtime-Version: 8.3.19

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Configuration xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="28f09fb3-3ca5-405c-ad7e-19fa171d86bb">
<name>SubsystemSynonymTooLong</name>
<synonym>
<key>en</key>
<value>SubsystemSynonymTooLong</value>
</synonym>
<containedObjects classId="9cd510cd-abfc-11d4-9434-004095e12fc7" objectId="cab95958-a6d0-4337-9779-7c517125d7cc"/>
<containedObjects classId="9fcd25a0-4822-11d4-9414-008048da11f9" objectId="35937ab6-0e39-4d97-93dd-a908aa102641"/>
<containedObjects classId="e3687481-0a87-462c-a166-9f34594f9bba" objectId="7c0ebced-ab28-4d40-beab-154116a8a97f"/>
<containedObjects classId="9de14907-ec23-4a07-96f0-85521cb6b53b" objectId="07fda3de-8ed2-44d2-a960-89e51a9ab04a"/>
<containedObjects classId="51f2d5d8-ea4d-4064-8892-82951750031e" objectId="d70c1730-dd4f-4f75-af6a-e96f758c6879"/>
<containedObjects classId="e68182ea-4237-4383-967f-90c1e3370bc7" objectId="5e03782b-4c67-400b-958e-54576027d7f4"/>
<containedObjects classId="fb282519-d103-4dd3-bc12-cb271d631dfc" objectId="34471cc6-f2a6-4046-a735-9c7b525ddd03"/>
<configurationExtensionCompatibilityMode>8.3.19</configurationExtensionCompatibilityMode>
<defaultRunMode>ManagedApplication</defaultRunMode>
<usePurposes>PersonalComputer</usePurposes>
<usedMobileApplicationFunctionalities>
<functionality>
<use>true</use>
</functionality>
<functionality>
<functionality>OSBackup</functionality>
<use>true</use>
</functionality>
</usedMobileApplicationFunctionalities>
<defaultLanguage>Language.English</defaultLanguage>
<dataLockControlMode>Managed</dataLockControlMode>
<objectAutonumerationMode>NotAutoFree</objectAutonumerationMode>
<modalityUseMode>DontUse</modalityUseMode>
<synchronousPlatformExtensionAndAddInCallUseMode>DontUse</synchronousPlatformExtensionAndAddInCallUseMode>
<compatibilityMode>8.3.19</compatibilityMode>
<languages uuid="eea564c8-5c95-4a2b-94cb-ce96d485d1ae">
<name>English</name>
<synonym>
<key>en</key>
<value>English</value>
</synonym>
<languageCode>en</languageCode>
</languages>
<languages uuid="be0edf19-4097-47ee-9090-f932e0febbb2">
<name>Deutsch</name>
<synonym>
<key>en</key>
<value>Deutsch</value>
</synonym>
<languageCode>de</languageCode>
</languages>
<languages uuid="4a933455-e811-43fc-a188-b1e8c2b3e24d">
<name>Russian</name>
<synonym>
<key>en</key>
<value>Russian</value>
</synonym>
<languageCode>ru</languageCode>
</languages>
<subsystems>Subsystem.TopLongDeIncluded</subsystems>
<subsystems>Subsystem.TopLongEnIncluded</subsystems>
<subsystems>Subsystem.TopLongNotIncluded</subsystems>
<subsystems>Subsystem.TopLongRuEnDeIncluded</subsystems>
<subsystems>Subsystem.TopShortEnRuDe</subsystems>
</mdclass:Configuration>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Subsystem xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="9b610df6-99ac-4c41-b752-4f2fe0370fbb">
<name>TopLongDeIncluded</name>
<synonym>
<key>en</key>
<value>This text is less than 35 symbols</value>
</synonym>
<synonym>
<key>de</key>
<value>Dieser Text ist mehr als 35 Symbole lang</value>
</synonym>
<synonym>
<key>ru</key>
<value>Этот текст менее 35 символов</value>
</synonym>
<includeHelpInContents>true</includeHelpInContents>
<includeInCommandInterface>true</includeInCommandInterface>
</mdclass:Subsystem>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Subsystem xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="03a189e4-e6d2-4576-aa24-65e859017f80">
<name>SubLong</name>
<synonym>
<key>en</key>
<value>This text is more than 35 symbols long</value>
</synonym>
<synonym>
<key>de</key>
<value>Dieser Text ist mehr als 35 Symbole lang</value>
</synonym>
<synonym>
<key>ru</key>
<value>Этот текст содержит более 35 символов </value>
</synonym>
<includeHelpInContents>true</includeHelpInContents>
<includeInCommandInterface>true</includeInCommandInterface>
<parentSubsystem>Subsystem.TopLongEnIncluded</parentSubsystem>
</mdclass:Subsystem>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Subsystem xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="be63c56b-06e3-4edc-9683-366cf5bdfbec">
<name>TopLongEnIncluded</name>
<synonym>
<key>en</key>
<value>This text is more than 35 symbols long</value>
</synonym>
<synonym>
<key>de</key>
<value>Text mit weniger als 35 Zeichen</value>
</synonym>
<synonym>
<key>ru</key>
<value>Этот текст менее 35 символов</value>
</synonym>
<includeHelpInContents>true</includeHelpInContents>
<includeInCommandInterface>true</includeInCommandInterface>
<subsystems>SubLong</subsystems>
</mdclass:Subsystem>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Subsystem xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="ec96311a-4da3-4a65-a438-3cdc7517c43e">
<name>TopLongNotIncluded</name>
<synonym>
<key>en</key>
<value>This text is more than 35 symbols long</value>
</synonym>
<synonym>
<key>de</key>
<value>Dieser Text ist mehr als 35 Symbole lang</value>
</synonym>
<synonym>
<key>ru</key>
<value>Этот текст содержит более 35 символов </value>
</synonym>
<includeHelpInContents>true</includeHelpInContents>
</mdclass:Subsystem>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Subsystem xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="962f1731-b609-40ab-a4ff-35dab90017a2">
<name>TopLongRuEnDeIncluded</name>
<synonym>
<key>en</key>
<value>This text is more than 35 symbols long</value>
</synonym>
<synonym>
<key>de</key>
<value>Dieser Text ist mehr als 35 Symbole lang</value>
</synonym>
<synonym>
<key>ru</key>
<value>Этот текст содержит более 35 символов </value>
</synonym>
<includeHelpInContents>true</includeHelpInContents>
<includeInCommandInterface>true</includeInCommandInterface>
</mdclass:Subsystem>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<cmi:CommandInterface xmlns:cmi="http://g5.1c.ru/v8/dt/cmi"/>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<mdclass:Subsystem xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="a57fe469-4e4f-459d-bec3-6874bc0fdfbd">
<name>TopShortEnRuDe</name>
<synonym>
<key>en</key>
<value>This text is less than 35 symbols</value>
</synonym>
<synonym>
<key>de</key>
<value>Text mit weniger als 35 Zeichen</value>
</synonym>
<synonym>
<key>ru</key>
<value>Этот текст менее 35 символов </value>
</synonym>
<includeHelpInContents>true</includeHelpInContents>
<includeInCommandInterface>true</includeInCommandInterface>
</mdclass:Subsystem>

View File

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.ql.itests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.ql;bundle-version="[0.2.0,0.3.0)"
Fragment-Host: com.e1c.v8codestyle.ql;bundle-version="[0.3.0,0.4.0)"
Automatic-Module-Name: com.e1c.v8codestyle.ql.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: fragment

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>tests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.ql.itests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>

View File

@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.e1c.v8codestyle.right.itests;singleton:=true
Bundle-Version: 0.2.0.qualifier
Bundle-Version: 0.3.0.qualifier
Bundle-Vendor: %providerName
Fragment-Host: com.e1c.v8codestyle.right;bundle-version="[0.2.0,0.3.0)"
Fragment-Host: com.e1c.v8codestyle.right;bundle-version="[0.3.0,0.4.0)"
Automatic-Module-Name: com.e1c.v8codestyle.right.itests
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Localization: fragment

View File

@ -19,9 +19,9 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>tests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>com.e1c.v8codestyle.right.itests</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
</project>

View File

@ -16,7 +16,7 @@
<parent>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>tests</artifactId>
@ -81,7 +81,7 @@
<artifact>
<groupId>com.e1c.v8codestyle</groupId>
<artifactId>default</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
</artifact>
</target>
<dependency-resolution>