Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7350 for trunk/tools


Ignore:
Timestamp:
01/17/12 23:28:54 (13 years ago)
Author:
abeham
Message:

#1759

  • Changed storable hook name rule to correctly distinguish between BeforeSerialization and AfterDeserialization hooks
  • Added a new rule that checks if more than one storable hook is defined in a class
Location:
trunk/tools/FxCop
Files:
2 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FxCop

    • Property svn:ignore set to
      *.suo
  • trunk/tools/FxCop/HeuristicLab.FxCop/HeuristicLab.FxCop.csproj

    r7340 r7350  
    4747  </ItemGroup>
    4848  <ItemGroup>
    49     <Compile Include="EnforceAfterDeserializationHookName.cs" />
     49    <Compile Include="EnforceOneStorableHookPerClass.cs" />
     50    <Compile Include="EnforceStorableHookNames.cs" />
    5051    <Compile Include="HeuristicLabFxCopRuleBase.cs" />
    5152    <Compile Include="Properties\AssemblyInfo.cs" />
  • trunk/tools/FxCop/HeuristicLab.FxCop/RuleMetadata.xml

    r7340 r7350  
    11<?xml version="1.0" encoding="utf-8" ?>
    22<Rules FriendlyName="HeuristicLab 3.3 FxCop Rules">
    3   <Rule TypeName="EnforceAfterDeserializationHookName" Category="HeuristicLab.Persistence" CheckId="HL0001">
    4     <Name>Enforce AfterDeserialization as method name</Name>
    5     <Description>Enforce the name AfterDeserialization for methods marked with the respective hook.</Description>
    6     <Resolution>Method {0} is marked to act as an AfterDeserializationHook. It needs to be called AfterDeserialization.</Resolution>
     3  <Rule TypeName="EnforceStorableHookNames" Category="HeuristicLab.Persistence" CheckId="HL0001">
     4    <Name>Enforce StorableHook Names</Name>
     5    <Description>The method that is marked to be a storable hook should always be called similar to the respective hook type.</Description>
     6    <Resolution>Method {0} is attributed as a StorableHook. It needs to be called {1}.</Resolution>
    77    <MessageLevel Certainty="100">Error</MessageLevel>
    8     <FixCategories>Breaking</FixCategories>
    9     <Url />
    10     <Owner />
    11     <Email />
     8    <FixCategories>NonBreaking</FixCategories>
     9    <Url></Url>
     10    <Owner></Owner>
     11    <Email></Email>
     12  </Rule>
     13  <Rule TypeName="EnforceOneStorableHookPerClass" Category="HeuristicLab.Persistence" CheckId="HL0002">
     14    <Name>Enforce One StorableHook Per Class</Name>
     15    <Description>Each class shall have only one storable hook of each type.</Description>
     16    <Resolution>Class {0} declares {1} storable hooks of type {2}. Merge these into one hook.</Resolution>
     17    <MessageLevel Certainty="100">Error</MessageLevel>
     18    <FixCategories>NonBreaking</FixCategories>
     19    <Url></Url>
     20    <Owner></Owner>
     21    <Email></Email>
    1222  </Rule>
    1323</Rules>
Note: See TracChangeset for help on using the changeset viewer.