-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37686 from dotnet/AddMissingConfigurationAndOptio…
…nsSourceGenDiagnostics
- Loading branch information
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: SYSLIB diagnostics for Microsoft.Extensions.Options.SourceGeneration | ||
description: Learn about the options validation source-generation analyzers that generate compile-time suggestions SYSLIB1201 through SYSLIB1219. | ||
ms.date: 10/24/2023 | ||
--- | ||
# SYSLIB diagnostics for options validation source generation | ||
|
||
The following table shows the diagnostic IDs for options validation source-generation analyzers in .NET 8 and later versions. | ||
|
||
| Diagnostic ID | Description | | ||
| - | - | | ||
| `SYSLIB1201` | Can't use `ValidateObjectMembersAttribute` or `ValidateEnumeratedItemsAttribute` on fields or properties with open generic types. | | ||
| `SYSLIB1202` | A member type has no fields or properties to validate. | | ||
| `SYSLIB1203` | A type has no fields or properties to validate. | | ||
| `SYSLIB1204` | A type annotated with `OptionsValidatorAttribute` doesn't implement the necessary interface. | | ||
| `SYSLIB1205` | A type already includes an implementation of the 'Validate' method. | | ||
| `SYSLIB1206` | Can't validate private fields or properties. | | ||
| `SYSLIB1207` | Member type is not enumerable. | | ||
| `SYSLIB1208` | Validators used for transitive or enumerable validation must have a constructor with no parameters. | | ||
| `SYSLIB1209` | `OptionsValidatorAttribute` can't be applied to a static class. | | ||
| `SYSLIB1210` | Null validator type specified for the `ValidateObjectMembersAttribute` or `ValidateEnumeratedItemsAttribute` attributes. | | ||
| `SYSLIB1211` | Unsupported circular references in model types. | | ||
| `SYSLIB1212` | Member potentially missing transitive validation. | | ||
| `SYSLIB1213` | Member potentially missing enumerable validation. | | ||
| `SYSLIB1214` | Can't validate constants, static fields or properties. | | ||
| `SYSLIB1215` | Validation attribute on the member is inaccessible from the validator type. | | ||
| `SYSLIB1216` | C# language version not supported by the options validation source generator. | | ||
| `SYSLIB1217` | The validation attribute is only applicable to properties of type string, array, or `ICollection`; it cannot be used with other types. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters