mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2024-12-01 02:32:18 +02:00
Отключение проверок для заимствованных объектов в расширении #1076
This commit is contained in:
parent
132c3d2905
commit
1745fbd0a3
@ -77,6 +77,7 @@
|
||||
- Некорректное сообщение об ошибке в строгих типах. Не существует типа "Таблица" #1055
|
||||
- Ложное сообщение об ошибке о неиспользовании составных типов для стандартных объектов метаданных #1069
|
||||
- Проверка: right-... не находит ошибку для роли с включением по умолчанию #815
|
||||
- Отключение проверок для заимствованных объектов в расширении #1076
|
||||
|
||||
## 0.2.0
|
||||
|
||||
|
@ -76,6 +76,7 @@ public final class CommonModuleNameCachedCheck
|
||||
.issueType(IssueType.WARNING)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME, COMMON_MODULE__RETURN_VALUES_REUSE);
|
||||
|
@ -74,6 +74,7 @@ public final class CommonModuleNameClient
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new MdObjectNameWithoutSuffix(NAME_SUFFIX_DEFAULT))
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME,
|
||||
|
@ -76,6 +76,7 @@ public final class CommonModuleNameClientCachedCheck
|
||||
.issueType(IssueType.WARNING)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME, COMMON_MODULE__RETURN_VALUES_REUSE);
|
||||
|
@ -75,6 +75,7 @@ public final class CommonModuleNameClientServer
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new MdObjectNameWithoutSuffix(NAME_SUFFIX_DEFAULT))
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME,
|
||||
|
@ -74,6 +74,7 @@ public final class CommonModuleNameGlobal
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new MdObjectNameWithoutSuffix(NAME_SUFFIX_DEFAULT))
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME,
|
||||
|
@ -76,6 +76,7 @@ public final class CommonModuleNameServerCallCachedCheck
|
||||
.issueType(IssueType.WARNING)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME, COMMON_MODULE__RETURN_VALUES_REUSE);
|
||||
|
@ -75,6 +75,7 @@ public final class CommonModuleNameServerCallCheck
|
||||
.issueType(IssueType.WARNING)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME, COMMON_MODULE__SERVER_CALL);
|
||||
|
@ -85,6 +85,7 @@ public final class CommonModuleType
|
||||
.issueType(IssueType.CODE_STYLE)
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(COMMON_MODULE)
|
||||
.checkTop()
|
||||
.features(CommonModuleTypes.SERVER.getFeatureValues(false).keySet().toArray(new EStructuralFeature[0]));
|
||||
|
@ -76,6 +76,7 @@ public final class DbObjectAnyRefTypeCheck
|
||||
.severity(IssueSeverity.MAJOR)
|
||||
.issueType(IssueType.PERFORMANCE)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(BASIC_DB_OBJECT)
|
||||
.containment(TYPE_DESCRIPTION)
|
||||
.features(TYPE_DESCRIPTION__TYPES);
|
||||
|
@ -86,6 +86,7 @@ public final class DbObjectRefNonRefTypesCheck
|
||||
.severity(IssueSeverity.MAJOR)
|
||||
.issueType(IssueType.PERFORMANCE)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(BASIC_DB_OBJECT)
|
||||
.containment(TYPE_DESCRIPTION)
|
||||
.features(TYPE_DESCRIPTION__TYPES);
|
||||
|
@ -84,7 +84,8 @@ public class MdListObjectPresentationCheck
|
||||
.severity(IssueSeverity.MINOR)
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.issueType(IssueType.UI_STYLE)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID));
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension());
|
||||
|
||||
builder.topObject(BASIC_DB_OBJECT)
|
||||
.checkTop()
|
||||
|
@ -60,6 +60,7 @@ public final class MdObjectNameLength
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.issueType(IssueType.PORTABILITY)
|
||||
.extension(new CommonSenseCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(MD_OBJECT)
|
||||
.checkTop()
|
||||
.features(MD_OBJECT__NAME)
|
||||
|
@ -56,6 +56,7 @@ public class MdScheduledJobDescriptionCheck
|
||||
.severity(IssueSeverity.MINOR)
|
||||
.issueType(IssueType.UI_STYLE)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(SCHEDULED_JOB)
|
||||
.checkTop()
|
||||
.features(SCHEDULED_JOB__DESCRIPTION, SCHEDULED_JOB__PREDEFINED);
|
||||
|
@ -124,6 +124,7 @@ public final class MdScheduledJobPeriodicityCheck
|
||||
.severity(IssueSeverity.MAJOR)
|
||||
.issueType(IssueType.PERFORMANCE)
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.topObject(SCHEDULE)
|
||||
.checkTop()
|
||||
.containment(DAILY_SCHEDULE)
|
||||
|
@ -95,6 +95,7 @@ public class MdStandardAttributeSynonymEmpty
|
||||
.issueType(IssueType.UI_STYLE)
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.extension(new CatalogChangeExtension());
|
||||
|
||||
builder.topObject(CATALOG).containment(STANDARD_ATTRIBUTE).features(STANDARD_ATTRIBUTE__SYNONYM);
|
||||
|
@ -0,0 +1,41 @@
|
||||
/*******************************************************************************
|
||||
* 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
|
||||
*******************************************************************************/
|
||||
package com.e1c.v8codestyle.md.check;
|
||||
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.MdObject;
|
||||
import com._1c.g5.v8.dt.metadata.mdclass.ObjectBelonging;
|
||||
import com.e1c.g5.v8.dt.check.components.IBasicCheckExtension;
|
||||
import com.e1c.g5.v8.dt.check.ext.ITopObjectFilter;
|
||||
|
||||
/**
|
||||
* The extension skips TOP MD object that adopted in Extension Configuration.
|
||||
*
|
||||
* @author Dmitriy Marmyshev
|
||||
*/
|
||||
public class SkipAdoptedInExtensionMdObjectExtension
|
||||
implements IBasicCheckExtension
|
||||
{
|
||||
@Override
|
||||
public ITopObjectFilter contributeTopObjectFilter()
|
||||
{
|
||||
return (object, parameters) -> {
|
||||
|
||||
if (object instanceof MdObject)
|
||||
{
|
||||
return ((MdObject)object).getObjectBelonging() != ObjectBelonging.ADOPTED;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
}
|
@ -33,6 +33,8 @@ 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;
|
||||
import com.e1c.v8codestyle.check.StandardCheckExtension;
|
||||
import com.e1c.v8codestyle.internal.md.CorePlugin;
|
||||
|
||||
/**
|
||||
* Check top subsystem synonym length that should be less then 35 by default or value
|
||||
@ -70,6 +72,8 @@ public class SubsystemSynonymTooLongCheck
|
||||
.complexity(CheckComplexity.NORMAL)
|
||||
.severity(IssueSeverity.MINOR)
|
||||
.extension(new TopObjectFilterExtension())
|
||||
.extension(new StandardCheckExtension(getCheckId(), CorePlugin.PLUGIN_ID))
|
||||
.extension(new SkipAdoptedInExtensionMdObjectExtension())
|
||||
.issueType(IssueType.UI_STYLE)
|
||||
.topObject(SUBSYSTEM)
|
||||
.checkTop()
|
||||
|
Loading…
Reference in New Issue
Block a user