FxCop没有反映变化

时间:2010-02-04 13:07:40

标签: c# fxcop

我正试着绕过FxCop。 (不应该那么难)。我正在查看现有的项目,所以我想我会从一个小帮手库开始。这是我的“常见”库,有扩展方法之类的东西。

我第一次在公共DLL上运行它时,我使用扩展方法得到了以下错误,(我在调试文件夹编译的DLL中指出了它):

CriticalWarning, Certainty 75, for IdentifiersShouldBeSpelledCorrectly
{
Target       : #IsNullOrEmptyOrJustSpaces(System.String)  (IntrospectionTargetMember)
Id           : s  (String)
Location     : file:///C:/hoh_code/bailey_dev/Bailey/trunk/source/Bailey.Common/Extensions/StringExtensions.cs<9>  (String)
Resolution   : "In method 'StringExtensions.IsNullOrEmptyOrJustSpaces(
               this string)', consider providing a more meaningful 
               name than parameter name 's'."
Help         : http://msdn2.microsoft.com/library/bb264492(VS.90).aspx  (String)
Category     : Microsoft.Naming  (String)
CheckId      : CA1704  (String)
RuleFile     : Naming Rules  (String)
Info         : "The individual words that make up an identifier should 
               not be abbreviated and should be spelled correctly. 
               If this rule generates a false positive on a term that 
               should be recognized, add the word to the FxCop custom 
               dictionary."
Created      : 04/02/2010 12:58:50  (DateTime)
LastSeen     : 04/02/2010 12:58:50  (DateTime)
Status       : Active  (MessageStatus)
Fix Category : Breaking  (FixCategories)

这个类看起来像这样:

using System;

namespace Bailey.Common.Extensions
{
   public static class StringExtensions
   {
       /// <summary>
       /// Checks that a string is either, NULL an Empty String or contains only spaces.
       /// </summary>
       /// <param name="s">The string to be checked</param>
       /// <returns>bool value</returns>
       public static bool IsNullOrEmptyOrJustSpaces(this string s)
       {
           return (s == null || s.Trim() == String.Empty);
       }
   }
}

现在看起来像这样:

using System;

namespace Bailey.Common.Extensions
{
    public static class StringExtensions
    {
       /// <summary>
       /// Checks that a string is either, NULL an Empty String or contains only spaces.
       /// </summary>
       /// <param name="stringToBeChecked">The string to be checked</param>
       /// <returns>bool value</returns>
       public static bool IsNullOrEmptyOrJustSpaces(this string stringToBeChecked)
       {
           if (String.IsNullOrEmpty(stringToBeChecked)) { return true; }
           return String.IsNullOrEmpty(stringToBeChecked.Trim());
       }
    }
}

我尝试重新运行FxCop,删除已编译的DLL,删除整个库并将其从SVN中取出并重新启动计算机但我仍然遇到同样的错误。

据我了解(可能是错误的),该错误应该不再出现,因为我修复了糟糕的命名和评论,构建,重建和清理项目,但它仍然说我做错了。

我的最终目标是通过我的新CI服务器运行并保存到文件中,但我不想走得那么远,直到我的基本工作在我脑海中工作和清洁。

有人可以帮我理解我出错的地方吗?

由于

修改

我想我一定是指着错误的DLL一些怎么样,会发誓我检查了路径,我知道我至少去了一次C的根来回溯路径检查一下。它现在在库中发现加载更多错误,并反映了我每次所做的更改。

0 个答案:

没有答案
相关问题