Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upChange CC0001 so that it does not apply to primitives #407
Comments
|
I guess that variable names should solve this problem, so IHMO, we should not give this kind of flexibility. |
|
All rules are optional. The user only needs to edit the rules file and done. This is a .NET thing, and VS makes it really easy to do. |
|
I think the idea of having two rules here sounds good. |
|
I agree that it would be wise to separate this into two rules. This var usage rule applied to number types can induce to errors. For example, the following sentence will launch the compiler error CS0031:
If you use the following sentence nothing will be launched:
|
|
I agree to change CC0001 so that it does not apply to primitives. @dgmachado the change to |
|
I agree with you @giggio. |
|
Agree |
|
I have updated the description so that it fits what we discussed. The issue is up for grabs and will be on 1.0.0. |
Fixes #407 CC0001 no longer applies to primitives
Change
CC0001so that it only works on non primitives. Raise the newCC0105for primitives.There is a list of primitives types on MSDN of primitives from C#:
Remarks:
CC0001.CC0001.CC0105Should apply to both when the type is declared using an identifier name (System.Int32 i;) or using a predefined type (int i;).CC0105should followCC0001category and severity level (Style and Warning).CC0001should updated to supportCC0105, but not other change should be made to it.Just as a reference, this is @OsirisTerje original comment: