Open jpetays opened 3 months ago
I'm not sure if I understood. How should I write the comments when having attributes? Thanks!
I'm using IntelliJ Rider IDE and just fix everything it tells me to do 😊
As I actually checked this, it is about compiler warning CS1587: XML comment is not placed on a valid language element
https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs1587
Example of code that produces this warning:
public class PageDot : MonoBehaviour
{
#region Variables
[Header("Configuration")]
/// <summary>
/// Determines whether it should change the Image component color on state changes
/// </summary>
[Tooltip("Determines whether it should change the Image component color on state changes")]
[SerializeField] private bool _useImageComponent;
Fixed code that is OK:
/// <summary>
/// Determines whether it should change the Image component color on state changes
/// </summary>
[Header("Configuration")]
[Tooltip("Determines whether it should change the Image component color on state changes")]
[SerializeField] private bool _useImageComponent;
Putting XML doc comment section between two C# Attributes is not good and IntelliJ Rider IDE gives this warning to me. Reorganizing lines so that all C# Attributes are after XML doc comment section fixes it.
One forward slash is missing:
And by the way, all C# Attributes should be after doc comments section.
At least Rider complaints if they are mixed between C# Attributes.
Annex D Documentation comments D.1 General "They must immediately precede a user-defined type (such as a class, delegate, or interface) or a member" might mean that C# Attributes are part of the type!? https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/documentation-comments