mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2025-01-07 08:57:02 +02:00
#1 Перенос проверок документирующего комментария
This commit is contained in:
parent
ba2289702c
commit
c7cf065d21
@ -29,6 +29,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.StandardCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check type definition that collection type (like array, map etc.) has type of contain item.
|
* Check type definition that collection type (like array, map etc.) has type of contain item.
|
||||||
@ -69,6 +71,7 @@ public class CollectionTypeDefinitionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new StandardCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(TypeDefinition.class);
|
.delegate(TypeDefinition.class);
|
||||||
builder.parameter(PARAMETER_COLLECTION_TYPES, String.class, DEFAULT_COLLECTION_TYPES,
|
builder.parameter(PARAMETER_COLLECTION_TYPES, String.class, DEFAULT_COLLECTION_TYPES,
|
||||||
Messages.CollectionTypeDefinitionCheck_Collection_types);
|
Messages.CollectionTypeDefinitionCheck_Collection_types);
|
||||||
|
@ -33,11 +33,13 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.StandardCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validator of export function that has return section in documentation comment if function has anything
|
* Validator of export function that has return section in documentation comment if function has anything
|
||||||
* in documentation comment. If function has link to some other function this means documentation inherites and
|
* in documentation comment. If function has link to some other function this means documentation inherits and
|
||||||
* validator checks documentation comment of linked function. Otherwise this function should have return section.
|
* validator checks documentation comment of linked function. Otherwise this function should have return section.
|
||||||
*
|
*
|
||||||
* @author Dmitriy Marmyshev
|
* @author Dmitriy Marmyshev
|
||||||
@ -86,6 +88,7 @@ public class ExportFunctionReturnSectionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MAJOR)
|
.severity(IssueSeverity.MAJOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new StandardCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(BslDocumentationComment.class);
|
.delegate(BslDocumentationComment.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates that field name in documentation comment is valid name (not starts with number or does not contains any
|
* Validates that field name in documentation comment is valid name (not starts with number or does not contains any
|
||||||
@ -53,6 +55,7 @@ public class FieldDefinitionNameCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(FieldDefinition.class);
|
.delegate(FieldDefinition.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.StandardCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that field definition in documentation comment has type definition section.
|
* Checks that field definition in documentation comment has type definition section.
|
||||||
@ -48,6 +50,7 @@ public class FieldDefinitionTypeCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new StandardCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(FieldDefinition.class);
|
.delegate(FieldDefinition.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check field that it has definition of complex type and also reference to constructor function instead of just only
|
* Check field that it has definition of complex type and also reference to constructor function instead of just only
|
||||||
@ -97,6 +99,7 @@ public class FieldDefinitionTypeWithLinkRefCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(FieldDefinition.class);
|
.delegate(FieldDefinition.class);
|
||||||
builder.parameter(PARAMETER_COLLECTION_TYPES, String.class, DEFAULT_COLLECTION_TYPES,
|
builder.parameter(PARAMETER_COLLECTION_TYPES, String.class, DEFAULT_COLLECTION_TYPES,
|
||||||
Messages.CollectionTypeDefinitionCheck_Collection_types);
|
Messages.CollectionTypeDefinitionCheck_Collection_types);
|
||||||
|
@ -37,6 +37,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.StandardCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,6 +91,7 @@ public class FunctionReturnSectionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new StandardCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(ReturnSection.class);
|
.delegate(ReturnSection.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates any description in documentation comment that is multi-line and may contains File definition like:
|
* Validates any description in documentation comment that is multi-line and may contains File definition like:
|
||||||
@ -64,6 +66,7 @@ public class MultilineDescriptionFieldSuggestionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.TRIVIAL)
|
.severity(IssueSeverity.TRIVIAL)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(Description.class);
|
.delegate(Description.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates method description in documentation comment that is multi-line and may contains parameter definition like:
|
* Validates method description in documentation comment that is multi-line and may contains parameter definition like:
|
||||||
@ -61,6 +63,7 @@ public class MultilineDescriptionParameterSuggestionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.TRIVIAL)
|
.severity(IssueSeverity.TRIVIAL)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(Description.class);
|
.delegate(Description.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.StandardCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates that each of parameters specified in documenting comments.
|
* Validates that each of parameters specified in documenting comments.
|
||||||
@ -57,6 +59,7 @@ public class ParametersSectionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new StandardCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(ParametersSection.class);
|
.delegate(ParametersSection.class);
|
||||||
builder.parameter(PARAMETER_CHECK_ONLY_EXPORT, Boolean.class, Boolean.FALSE.toString(),
|
builder.parameter(PARAMETER_CHECK_ONLY_EXPORT, Boolean.class, Boolean.FALSE.toString(),
|
||||||
Messages.ParametersSectionCheck_Check_only_export_method_parameter_section);
|
Messages.ParametersSectionCheck_Check_only_export_method_parameter_section);
|
||||||
|
@ -23,6 +23,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The check validate {@link ReturnSection} of documentation comment if the method is {@link Procedure} which should not
|
* The check validate {@link ReturnSection} of documentation comment if the method is {@link Procedure} which should not
|
||||||
@ -50,6 +52,7 @@ public class ProcedureReturnSectionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(ReturnSection.class);
|
.delegate(ReturnSection.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates {@link LinkPart} of documentation comment that it referenced to an existing object.
|
* Validates {@link LinkPart} of documentation comment that it referenced to an existing object.
|
||||||
@ -77,6 +79,7 @@ public class RefLinkPartCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(LinkPart.class);
|
.delegate(LinkPart.class);
|
||||||
builder.parameter(PARAMETER_ALLOW_SEE_IN_DESCRIPTION, Boolean.class, Boolean.TRUE.toString(),
|
builder.parameter(PARAMETER_ALLOW_SEE_IN_DESCRIPTION, Boolean.class, Boolean.TRUE.toString(),
|
||||||
Messages.RefLinkPartCheck_Allow_See_in_description);
|
Messages.RefLinkPartCheck_Allow_See_in_description);
|
||||||
|
@ -32,6 +32,8 @@ import com.e1c.g5.v8.dt.check.CheckComplexity;
|
|||||||
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
import com.e1c.g5.v8.dt.check.ICheckParameters;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
import com.e1c.g5.v8.dt.check.settings.IssueSeverity;
|
||||||
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
import com.e1c.g5.v8.dt.check.settings.IssueType;
|
||||||
|
import com.e1c.v8codestyle.check.CommonSenseCheckExtension;
|
||||||
|
import com.e1c.v8codestyle.internal.bsl.BslPlugin;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,6 +74,7 @@ public class TypeDefinitionCheck
|
|||||||
.complexity(CheckComplexity.NORMAL)
|
.complexity(CheckComplexity.NORMAL)
|
||||||
.severity(IssueSeverity.MINOR)
|
.severity(IssueSeverity.MINOR)
|
||||||
.issueType(IssueType.CODE_STYLE)
|
.issueType(IssueType.CODE_STYLE)
|
||||||
|
.extension(new CommonSenseCheckExtension(getCheckId(), BslPlugin.PLUGIN_ID))
|
||||||
.delegate(TypeDefinition.class);
|
.delegate(TypeDefinition.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user