CollinAlpert / Lombok.NET

.NET adaptation for Java's Lombok using Source Generators.
MIT License
309 stars 16 forks source link

Why [AllArgsConstructor(MemberType.Property, AccessTypes.Public)] Require the first letter should be capitalized? #12

Closed tianmafly closed 1 year ago

tianmafly commented 2 years ago

[AllArgsConstructor(MemberType.Property, AccessTypes.Public)] public partial class Test { public string Msg { get; set; } // is OK //public string msg { get; set; } // is wrong } Why [AllArgsConstructor(MemberType.Property, AccessTypes.Public)] Require the first letter should be capitalized?

CollinAlpert commented 2 years ago

Properties in C# are PascalCase by convention, so Lombok.NET expects the first character to be uppercase.

tianmafly commented 2 years ago

I think that it is not flexible. java the first letter should be lowercase. It is confounded for people who previously used java. This people may take a long time to find the problem,and think this is a bug。 thanks

CollinAlpert commented 2 years ago

This is not a Java library and it is not designed to work best specifically for Java developers. However, I agree the Source Generator should not generate invalid code, so I will fix this.

CollinAlpert commented 1 year ago

The fix is released in v1.2.3.

tianmafly commented 1 year ago

It is ok, thanks.