Reporter | Torsten Preuß (TorstenP) |
---|---|
Created | Feb 15, 2012 8:52:33 PM |
Updated | Feb 15, 2012 8:55:44 PM |
Priority | Normal |
Type | Bug |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Sergey Shkredov (serjic.shkredov) |
Subsystem | Naming |
Affected versions | 6.1, 6.1.1 |
Fixed in build | No Fixed in build |
We're using advanced naming rules. (C# -> Naming Style -> Advanced Settings)
1. These rules cannot be reordered. Move up or down is not working!
2. If you Export/Import these settings (Manage -> Export/Import) then these rules get reordered. That is resulting in wrong warnings in the code-editor, because wrong rules are used first.
I opended the .DotSettings-File and searched for the rules. I found them and I think I found the problem. It looks like the rules are ordered by there unique ID. I then exchanged the ID's of the rules and now the rules are ordered correct.
Here is an example of my rules with the ID's in correct order:
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=0b828848_002Dee4b_002D4aa9_002D97f0_002D6681636c75de/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="interfaces"><ElementKinds><Kind Name="INTERFACE" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=8a1ba912_002D5a66_002D4b0b_002Daa86_002Dcae7b9ba95fd/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="type parameters"><ElementKinds><Kind Name="TYPE_PARAMETER" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a76382bb_002D6209_002D4bc6_002D897a_002D5d3be5ff1a59/@EntryIndexedValue"><Policy><Descriptor Staticness="Instance" AccessRightKinds="No" Description="local variables/constants/parameters"><ElementKinds><Kind Name="LOCAL_VARIABLE" /><Kind Name="LOCAL_CONSTANT" /><Kind Name="PARAMETER" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=bf9b0462_002D4e79_002D4661_002Dbdcb_002D6ce765ef4121/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal" Description="not public fields (constant)"><ElementKinds><Kind Name="FIELD" /><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=c933ba32_002D4871_002D465a_002D8d03_002D7e200a943b51/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Public" Description="public fields"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="BAD_" Suffix="" Style="AaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f1e5221a_002D8216_002D467b_002D9e2b_002D5325c1dbd075/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="all other entries"><ElementKinds><Kind Name="LAMBDA_PARAMETER" /><Kind Name="ASYNC_METHOD" /><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /><Kind Name="CONSTANT_FIELD" /><Kind Name="ENUM_MEMBER" /><Kind Name="LOCAL_VARIABLE" /><Kind Name="LOCAL_CONSTANT" /><Kind Name="CLASS" /><Kind Name="INTERFACE" /><Kind Name="DELEGATE" /><Kind Name="ENUM" /><Kind Name="NAMESPACE" /><Kind Name="METHOD" /><Kind Name="PROPERTY" /><Kind Name="EVENT" /><Kind Name="PARAMETER" /><Kind Name="LABEL" /><Kind Name="TYPE_PARAMETER" /><Kind Name="TEST_TYPE" /><Kind Name="TEST_MEMBER" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
As you can see, the rules are ordered by there ID.
This is just a workaround. The solution would be an index for every rule.
I hope I could help.
1. These rules cannot be reordered. Move up or down is not working!
2. If you Export/Import these settings (Manage -> Export/Import) then these rules get reordered. That is resulting in wrong warnings in the code-editor, because wrong rules are used first.
I opended the .DotSettings-File and searched for the rules. I found them and I think I found the problem. It looks like the rules are ordered by there unique ID. I then exchanged the ID's of the rules and now the rules are ordered correct.
Here is an example of my rules with the ID's in correct order:
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=0b828848_002Dee4b_002D4aa9_002D97f0_002D6681636c75de/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="interfaces"><ElementKinds><Kind Name="INTERFACE" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="I" Suffix="" Style="AaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=8a1ba912_002D5a66_002D4b0b_002Daa86_002Dcae7b9ba95fd/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="type parameters"><ElementKinds><Kind Name="TYPE_PARAMETER" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a76382bb_002D6209_002D4bc6_002D897a_002D5d3be5ff1a59/@EntryIndexedValue"><Policy><Descriptor Staticness="Instance" AccessRightKinds="No" Description="local variables/constants/parameters"><ElementKinds><Kind Name="LOCAL_VARIABLE" /><Kind Name="LOCAL_CONSTANT" /><Kind Name="PARAMETER" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=bf9b0462_002D4e79_002D4661_002Dbdcb_002D6ce765ef4121/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal" Description="not public fields (constant)"><ElementKinds><Kind Name="FIELD" /><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=c933ba32_002D4871_002D465a_002D8d03_002D7e200a943b51/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Public" Description="public fields"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="BAD_" Suffix="" Style="AaBb" /></Policy></s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f1e5221a_002D8216_002D467b_002D9e2b_002D5325c1dbd075/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private, Protected, ProtectedInternal, Internal, Public" Description="all other entries"><ElementKinds><Kind Name="LAMBDA_PARAMETER" /><Kind Name="ASYNC_METHOD" /><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /><Kind Name="CONSTANT_FIELD" /><Kind Name="ENUM_MEMBER" /><Kind Name="LOCAL_VARIABLE" /><Kind Name="LOCAL_CONSTANT" /><Kind Name="CLASS" /><Kind Name="INTERFACE" /><Kind Name="DELEGATE" /><Kind Name="ENUM" /><Kind Name="NAMESPACE" /><Kind Name="METHOD" /><Kind Name="PROPERTY" /><Kind Name="EVENT" /><Kind Name="PARAMETER" /><Kind Name="LABEL" /><Kind Name="TYPE_PARAMETER" /><Kind Name="TEST_TYPE" /><Kind Name="TEST_MEMBER" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
As you can see, the rules are ordered by there ID.
This is just a workaround. The solution would be an index for every rule.
I hope I could help.