Updated docs - prepared for next iteration.

This commit is contained in:
Mikael Lindemann 2021-04-01 12:58:02 +02:00
Родитель 6a7a5708ae
Коммит 5d00558e08
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 28C86AD4F4866E2B
5 изменённых файлов: 33 добавлений и 26 удалений

Просмотреть файл

@ -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;
}