Updated docs - prepared for next iteration.
This commit is contained in:
Родитель
6a7a5708ae
Коммит
5d00558e08
|
@ -1,4 +1,4 @@
|
|||
version: 9.0.0.{build}
|
||||
version: 9.0.1-alpha{build}
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
## Release 8.1.0
|
||||
## Release 9.0.0
|
||||
|
||||
### New Rules
|
||||
Rule ID | Category | Severity | Notes
|
||||
--------|----------|----------|-------
|
||||
PA0001 | Usage | Info | NonSingleFieldRegionAnalyzer, [Documentation](PA0001/README.md)
|
||||
PA0002 | Usage | Error | InvalidSingleFieldComplexRegionAnalyzer, [Documentation](PA0002/README.md)
|
||||
PA0003 | Usage | Error | PostTypeAttributeOnlyForClassesInheritingPostAnalyzer, [Documentation](PA0003/README.md)
|
||||
PA0004 | Usage | Error | PageTypeAttributeOnlyForClassesInheritingPageAnalyzer, [Documentation](PA0004/README.md)
|
||||
PA0005 | Usage | Error | SiteTypeAttributeOnlyForClassesInheritingSiteContentAnalyzer, [Documentation](PA0005/README.md)
|
||||
PA0006 | Usage | Error | IncorrectFieldSettingsAttributeAnalyzer, [Documentation](PA0006/README.md)
|
||||
|
||||
## Release 8.1.0
|
||||
|
||||
### New Rules
|
||||
Rule ID | Category | Severity | Notes
|
||||
--------|----------|----------|-------
|
||||
PA0001 | Usage | Info | NonSingleFieldRegionAnalyzer, [Documentation](PA0001/README.md)
|
||||
PA0002 | Usage | Error | InvalidSingleFieldComplexRegionAnalyzer, [Documentation](PA0002/README.md)
|
||||
PA0003 | Usage | Error | PostTypeAttributeOnlyForClassesInheritingPostAnalyzer, [Documentation](PA0003/README.md)
|
||||
PA0004 | Usage | Error | PageTypeAttributeOnlyForClassesInheritingPageAnalyzer, [Documentation](PA0004/README.md)
|
||||
PA0005 | Usage | Error | SiteTypeAttributeOnlyForClassesInheritingSiteContentAnalyzer, [Documentation](PA0005/README.md)
|
|
@ -1,4 +1,3 @@
|
|||
### New Rules
|
||||
Rule ID | Category | Severity | Notes
|
||||
--------|----------|----------|-------
|
||||
PA0006 | Usage | Error | [Documentation](PA0006/README.md)
|
|
@ -1,9 +1,17 @@
|
|||
# Piranha.Analyzers
|
||||
## Release 9.0.0
|
||||
|
||||
| ID | Title | Severity | Category |
|
||||
|----------|---------------------------------------------------------|----------|----------|
|
||||
| [PA0001] | `FieldType` should not be used as a single field region | Info | Usage |
|
||||
| [PA0002] | Piranha does not support single field complex regions | Error | Usage |
|
||||
### New Rules
|
||||
Rule ID | Category | Severity | Notes
|
||||
--------|----------|----------|-------
|
||||
PA0006 | Usage | Error | IncorrectFieldSettingsAttributeAnalyzer, [Documentation](PA0006/README.md)
|
||||
|
||||
[PA0001]: ./PA0001/README.md
|
||||
[PA0002]: ./PA0002/README.md
|
||||
## Release 8.1.0
|
||||
|
||||
### New Rules
|
||||
Rule ID | Category | Severity | Notes
|
||||
--------|----------|----------|-------
|
||||
PA0001 | Usage | Info | NonSingleFieldRegionAnalyzer, [Documentation](PA0001/README.md)
|
||||
PA0002 | Usage | Error | InvalidSingleFieldComplexRegionAnalyzer, [Documentation](PA0002/README.md)
|
||||
PA0003 | Usage | Error | PostTypeAttributeOnlyForClassesInheritingPostAnalyzer, [Documentation](PA0003/README.md)
|
||||
PA0004 | Usage | Error | PageTypeAttributeOnlyForClassesInheritingPageAnalyzer, [Documentation](PA0004/README.md)
|
||||
PA0005 | Usage | Error | SiteTypeAttributeOnlyForClassesInheritingSiteContentAnalyzer, [Documentation](PA0005/README.md)
|
|
@ -39,18 +39,11 @@ namespace Piranha.Analyzers
|
|||
|
||||
private static void AnalyzeSyntaxNode(SyntaxNodeAnalysisContext context)
|
||||
{
|
||||
if (!(context.Node is AttributeSyntax attribute))
|
||||
if (context.Node is not AttributeSyntax attribute)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// var regionAttributeType = context.Compilation.GetTypeByMetadataName(Constants.Types.Piranha.Extend.RegionAttribute);
|
||||
|
||||
// if (regionAttributeType == null)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
var attributeType = context.SemanticModel.GetTypeInfo(attribute, context.CancellationToken).Type;
|
||||
var fieldSettingsAttributeType = context.Compilation.GetTypeByMetadataName(Constants.Types.Piranha.Extend.FieldSettingsAttribute);
|
||||
|
||||
|
@ -66,12 +59,12 @@ namespace Piranha.Analyzers
|
|||
return;
|
||||
}
|
||||
|
||||
if (!(attribute.Parent is AttributeListSyntax attributeList))
|
||||
if (attribute.Parent is not AttributeListSyntax attributeList)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(attributeList.Parent is PropertyDeclarationSyntax property))
|
||||
if (attributeList.Parent is not PropertyDeclarationSyntax property)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче