-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
C# coding guidelinesContent related to the C# coding guidelinesContent related to the C# coding guidelinesanalyzerItems here affect the analyzersItems here affect the analyzersproposalItems flagged with this are up for discussion to be included in the IntelliTect coding standardsItems flagged with this are up for discussion to be included in the IntelliTect coding standards
Description
With the introduction of positional records it has become more valuable to apply attributes inline. This is especially true when dealing with serialization.
Consider the following which triggers INTL0001 (Properties must be on their own line)
public record MyDto([property:JsonPropertyName("my_Value")] string Value);
The work around is to simply do as the analyzer suggests and put it on its own line:
public record MyDto(
[property:JsonPropertyName("my_Value")]
string Value);
However, I would posit that this is less readable that the original.
We should revisit the attribute guidelines with these new use-cases in mind.
Metadata
Metadata
Assignees
Labels
C# coding guidelinesContent related to the C# coding guidelinesContent related to the C# coding guidelinesanalyzerItems here affect the analyzersItems here affect the analyzersproposalItems flagged with this are up for discussion to be included in the IntelliTect coding standardsItems flagged with this are up for discussion to be included in the IntelliTect coding standards