|
|
 |
Assemblies checked: 13
Warnings: 694
Critical Warnings: 145
Errors: 2390
Critical Errors: 365
Total Messages: 3108
|
|
Assembly |
Types |
Warnings |
Errors |
Total Messages |
 |
 |
cccmd.exe |
1 |
0 |
19 |
19 |
|
 |
 |
$(ProjectDir)/../Build/CCCmd/CCCmd.exe - cccmd.exe |
NonBreaking |
95 %
|
Assemblies should have valid strong names |
|
| Rule: |
Assemblies should have valid strong names |
| Check Id: |
CA2210 |
| Category: |
Microsoft.Design |
| Description: |
Either the assembly has no strong name, an invalid one, or the strong name is valid only because of the computer configuration. The assembly should not be deployed in this state. The most common causes of this are: 1) The assembly's contents were modified after it was signed. 2) The signing process failed. 3) The assembly was delay-signed. 4) A registry key existed that allowed the check to pass (where it would not have otherwise). |
| Found at: |
|
| Resolution: |
Sign 'CCCmd.exe' with a strong name key. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182127(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/CCCmd/CCCmd.exe - cccmd.exe |
NonBreaking |
95 %
|
Mark assemblies with CLSCompliantAttribute |
|
| Rule: |
Mark assemblies with CLSCompliantAttribute |
| Check Id: |
CA1014 |
| Category: |
Microsoft.Design |
| Description: |
Assemblies should explicitly state their CLS compliance using the CLSCompliant attribute. An assembly without this attribute is not CLS-compliant. Assemblies, modules, and types can be CLS-compliant even if some parts of the assembly, module, or type are not CLS-compliant. The following rules apply: 1) If the element is marked CLSCompliant, any noncompliant members must have the CLSCompliant attribute present with its argument set to false. 2) A comparable CLS-compliant alternative member must be supplied for each member that is not CLS-compliant. |
| Found at: |
|
| Resolution: |
Mark 'CCCmd.exe' with CLSCompliant(true) because it exposes externally visible types. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182156(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #DisplayProject(ThoughtWorks.CruiseControl.Remote.ProjectStatus) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 276 |
| Resolution: |
Modify 'Program.DisplayProject(ProjectStatus)' to catch a more specific exception than 'object' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #DisplayProject(ThoughtWorks.CruiseControl.Remote.ProjectStatus) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 261 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Program.DisplayProject(ProjectStatus)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #DisplayProject(ThoughtWorks.CruiseControl.Remote.ProjectStatus) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 260 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'Program.DisplayProject(ProjectStatus)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #DisplayProjectStatus(ThoughtWorks.CruiseControl.Remote.CruiseServerClientBase,System.String,System.Boolean) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 252 |
| Resolution: |
Modify 'Program.DisplayProjectStatus(CruiseServerClientBase, string, bool)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #DisplayProjectStatus(ThoughtWorks.CruiseControl.Remote.CruiseServerClientBase,System.String,System.Boolean) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 234 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'Program.DisplayProjectStatus(CruiseServerClientBase, string, bool)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #DisplayServerStatus(ThoughtWorks.CruiseControl.Remote.CruiseServerClientBase,System.Boolean) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 224 |
| Resolution: |
Modify 'Program.DisplayServerStatus(CruiseServerClientBase, bool)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #Main(System.String[]) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 80 |
| Resolution: |
'Program.Main(string[])' creates an exception of type 'Exception', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunAbortBuild() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 137 |
| Resolution: |
Modify 'Program.RunAbortBuild()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunAbortBuild() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 132 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Program.RunAbortBuild()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunForceBuild() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 115 |
| Resolution: |
Modify 'Program.RunForceBuild()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunForceBuild() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 110 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Program.RunForceBuild()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunStartProject() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 159 |
| Resolution: |
Modify 'Program.RunStartProject()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunStartProject() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 154 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Program.RunStartProject()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunStopProject() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 181 |
| Resolution: |
Modify 'Program.RunStopProject()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #RunStopProject() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 176 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Program.RunStopProject()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #ValidateNotAll() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 299 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Program.ValidateNotAll()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Program - #ValidateParameter(System.String,System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCCmd\Program.cs at line 289 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Program.ValidateParameter(string, string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
|
 |
 |
cctray.exe |
1 |
0 |
9 |
9 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/cctray.exe - cctray.exe |
NonBreaking |
95 %
|
Assemblies should have valid strong names |
|
| Rule: |
Assemblies should have valid strong names |
| Check Id: |
CA2210 |
| Category: |
Microsoft.Design |
| Description: |
Either the assembly has no strong name, an invalid one, or the strong name is valid only because of the computer configuration. The assembly should not be deployed in this state. The most common causes of this are: 1) The assembly's contents were modified after it was signed. 2) The signing process failed. 3) The assembly was delay-signed. 4) A registry key existed that allowed the check to pass (where it would not have otherwise). |
| Found at: |
|
| Resolution: |
Sign 'cctray.exe' with a strong name key. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182127(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/cctray.exe - cctray.exe |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'cctray' in assembly name 'cctray.exe' by changing it to 'Cctray'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/cctray.exe - cctray.exe |
NonBreaking |
95 %
|
Mark assemblies with CLSCompliantAttribute |
|
| Rule: |
Mark assemblies with CLSCompliantAttribute |
| Check Id: |
CA1014 |
| Category: |
Microsoft.Design |
| Description: |
Assemblies should explicitly state their CLS compliance using the CLSCompliant attribute. An assembly without this attribute is not CLS-compliant. Assemblies, modules, and types can be CLS-compliant even if some parts of the assembly, module, or type are not CLS-compliant. The following rules apply: 1) If the element is marked CLSCompliant, any noncompliant members must have the CLSCompliant attribute present with its argument set to false. 2) A comparable CLS-compliant alternative member must be supplied for each member that is not CLS-compliant. |
| Found at: |
|
| Resolution: |
Mark 'cctray.exe' with CLSCompliant(true) because it exposes externally visible types. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182156(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/cctray.exe - cctray.exe |
NonBreaking |
95 %
|
Mark assemblies with ComVisibleAttribute |
|
| Rule: |
Mark assemblies with ComVisibleAttribute |
| Check Id: |
CA1017 |
| Category: |
Microsoft.Design |
| Description: |
The System.Runtime.InteropServices.ComVisible attribute indicates whether COM clients can use the library. Good design dictates that developers explicitly indicate COM visibility. The default value for this attribute is 'true'. However, the best design is to mark the assembly ComVisible false, and then mark types, interfaces, and individual members as ComVisible true, as appropriate. |
| Found at: |
|
| Resolution: |
Because 'cctray.exe' exposes externally visible types, mark it with ComVisible(false) at the assembly level and then mark all types within the assembly that should be exposed to COM clients with ComVisible(true). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182157(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTray - Bootstrap |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'Bootstrap'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Bootstrap - #DisplayHelp(ThoughtWorks.CruiseControl.Remote.Mono.OptionSet) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTray\Bootstrap.cs at line 122 |
| Resolution: |
Because the behavior of 'StringWriter.StringWriter(StringBuilder)' could vary based on the current user's locale settings, replace this call in 'Bootstrap.DisplayHelp(OptionSet)' with a call to 'StringWriter.StringWriter(StringBuilder, IFormatProvider)'. If the result of 'StringWriter.StringWriter(StringBuilder, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Bootstrap - #DisplayHelp(ThoughtWorks.CruiseControl.Remote.Mono.OptionSet) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTray\Bootstrap.cs at line 125 |
| Resolution: |
Change 'Bootstrap.DisplayHelp(OptionSet)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Bootstrap - #Main(System.String[]) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTray\Bootstrap.cs at line 59 |
| Resolution: |
Change 'Bootstrap.Main(string[])' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Bootstrap - #UnhandledWinFormException(System.Object,System.Threading.ThreadExceptionEventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTray\Bootstrap.cs at line 88 |
| Resolution: |
Change 'Bootstrap.UnhandledWinFormException(object, ThreadExceptionEventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
|
 |
 |
thoughtworks.cruisecontrol.cctraylib.dll |
109 |
88 |
340 |
428 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/ThoughtWorks.CruiseControl.CCTrayLib.dll - thoughtworks.cruisecontrol.cctraylib.dll |
NonBreaking |
95 %
|
Assemblies should have valid strong names |
|
| Rule: |
Assemblies should have valid strong names |
| Check Id: |
CA2210 |
| Category: |
Microsoft.Design |
| Description: |
Either the assembly has no strong name, an invalid one, or the strong name is valid only because of the computer configuration. The assembly should not be deployed in this state. The most common causes of this are: 1) The assembly's contents were modified after it was signed. 2) The signing process failed. 3) The assembly was delay-signed. 4) A registry key existed that allowed the check to pass (where it would not have otherwise). |
| Found at: |
|
| Resolution: |
Sign 'ThoughtWorks.CruiseControl.CCTrayLib.dll' with a strong name key. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182127(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/ThoughtWorks.CruiseControl.CCTrayLib.dll - thoughtworks.cruisecontrol.cctraylib.dll |
NonBreaking |
95 %
|
Mark assemblies with CLSCompliantAttribute |
|
| Rule: |
Mark assemblies with CLSCompliantAttribute |
| Check Id: |
CA1014 |
| Category: |
Microsoft.Design |
| Description: |
Assemblies should explicitly state their CLS compliance using the CLSCompliant attribute. An assembly without this attribute is not CLS-compliant. Assemblies, modules, and types can be CLS-compliant even if some parts of the assembly, module, or type are not CLS-compliant. The following rules apply: 1) If the element is marked CLSCompliant, any noncompliant members must have the CLSCompliant attribute present with its argument set to false. 2) A comparable CLS-compliant alternative member must be supplied for each member that is not CLS-compliant. |
| Found at: |
|
| Resolution: |
Mark 'ThoughtWorks.CruiseControl.CCTrayLib.dll' with CLSCompliant(true) because it exposes externally visible types. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182156(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/ThoughtWorks.CruiseControl.CCTrayLib.dll - thoughtworks.cruisecontrol.cctraylib.dll |
NonBreaking |
95 %
|
Mark assemblies with ComVisibleAttribute |
|
| Rule: |
Mark assemblies with ComVisibleAttribute |
| Check Id: |
CA1017 |
| Category: |
Microsoft.Design |
| Description: |
The System.Runtime.InteropServices.ComVisible attribute indicates whether COM clients can use the library. Good design dictates that developers explicitly indicate COM visibility. The default value for this attribute is 'true'. However, the best design is to mark the assembly ComVisible false, and then mark types, interfaces, and individual members as ComVisible true, as appropriate. |
| Found at: |
|
| Resolution: |
Because 'ThoughtWorks.CruiseControl.CCTrayLib.dll' exposes externally visible types, mark it with ComVisible(false) at the assembly level and then mark all types within the assembly that should be exposed to COM clients with ComVisible(true). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182157(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/CCTray/ThoughtWorks.CruiseControl.CCTrayLib.dll - thoughtworks.cruisecontrol.cctraylib.dll |
NonBreaking |
95 %
|
Mark assemblies with NeutralResourcesLanguageAttribute |
|
| Rule: |
Mark assemblies with NeutralResourcesLanguageAttribute |
| Check Id: |
CA1824 |
| Category: |
Microsoft.Performance |
| Description: |
The NeutralResourcesLanguage attribute informs the ResourceManager of the language used to render the neutral culture's resources for an assembly. When looking up resources in the same culture as the neutral resources language, the ResourceManager automatically uses the resources located in the main assembly, instead of searching for a satellite assembly with the current user interface culture for the current thread. This will improve lookup performance for the first resource you load and can reduce your working set. |
| Found at: |
|
| Resolution: |
Because assembly 'ThoughtWorks.CruiseControl.CCTrayLib.dll' contains a ResX-based resource file, mark it with the NeutralResourcesLanguage attribute, specifying the language of the resources within the assembly. This could improve lookup performance the first time a resource is retrieved. |
| Help Link: |
http://msdn2.microsoft.com/library/bb385967(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib - Audio |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'Audio'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Audio - #PlaySound(System.Byte[],System.Int16,System.Int64) |
Breaking |
95 %
|
Move P/Invokes to NativeMethods class |
|
| Rule: |
Move P/Invokes to NativeMethods class |
| Check Id: |
CA1060 |
| Category: |
Microsoft.Design |
| Description: |
This type contains members with the DllImport attribute. Members with the DllImport attribute should be contained in classes named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. |
| Found at: |
|
| Resolution: |
Because it is a P/Invoke method, 'Audio.PlaySound(byte[], short, long)' should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182161(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Audio - #PlaySound(System.Byte[],System.Int16,System.Int64) |
NonBreaking |
95 %
|
P/Invoke declarations should be portable |
|
| Rule: |
P/Invoke declarations should be portable |
| Check Id: |
CA1901 |
| Category: |
Microsoft.Portability |
| Description: |
. |
| Found at: |
|
| Resolution: |
As it is declared in your code, parameter 'hMod' of P/Invoke 'Audio.PlaySound(byte[], short, long)' will be 2 bytes wide on 32-bit platforms. This is not correct, as the actual native declaration of this API indicates it should be 4 bytes wide on 32-bit platforms. Consult the MSDN Platform SDK documentation for help determining what data type should be used instead of 'short'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182284(VS.90).aspx |
| Rule File: |
PortabilityRules.dll Version: 9.0.0.0 |
|
 |
 |
Audio - #PlaySound(System.Byte[],System.Int16,System.Int64) |
NonBreaking |
95 %
|
P/Invoke declarations should be portable |
|
| Rule: |
P/Invoke declarations should be portable |
| Check Id: |
CA1901 |
| Category: |
Microsoft.Portability |
| Description: |
. |
| Found at: |
|
| Resolution: |
As it is declared in your code, parameter 'fdwSound' of P/Invoke 'Audio.PlaySound(byte[], short, long)' will be 8 bytes wide on 32-bit platforms. This is not correct, as the actual native declaration of this API indicates it should be 4 bytes wide on 32-bit platforms. Consult the MSDN Platform SDK documentation for help determining what data type should be used instead of 'long'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182284(VS.90).aspx |
| Rule File: |
PortabilityRules.dll Version: 9.0.0.0 |
|
 |
 |
Audio - #sndPlaySoundA(System.String,System.Int32) |
Breaking |
95 %
|
Move P/Invokes to NativeMethods class |
|
| Rule: |
Move P/Invokes to NativeMethods class |
| Check Id: |
CA1060 |
| Category: |
Microsoft.Design |
| Description: |
This type contains members with the DllImport attribute. Members with the DllImport attribute should be contained in classes named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. |
| Found at: |
|
| Resolution: |
Because it is a P/Invoke method, 'Audio.sndPlaySoundA(string, int)' should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182161(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Audio - #sndPlaySoundA(System.String,System.Int32) |
NonBreaking |
75 %
|
Specify marshaling for P/Invoke string arguments |
|
| Rule: |
Specify marshaling for P/Invoke string arguments |
| Check Id: |
CA2101 |
| Category: |
Microsoft.Globalization |
| Description: |
When marshaling strings as ANSI (or as Auto on Win9x), some characters may be changed. If best-fit mapping is on, strings that appear different in Unicode will be marshaled to identical ANSI strings, which may lead to incorrect security decisions. Turning best-fit mapping off reduces this risk, as all characters without equivalents are mapped to '?'. Also, note that CharSet.Ansi is the default setting for all string marshaling; Unicode marshaling must be specified explicitly, either as a CharSet setting of DllImport or StructLayout, or as a MarshalAs attribute with a Unicode (or system-dependent) UnmanagedType. |
| Found at: |
|
| Resolution: |
To reduce security risk, marshal parameter 'lpszSoundName' as Unicode, by setting DllImport.CharSet to CharSet.Unicode, or by explicitly marshaling the parameter as UnmanagedType.LPWStr. If you need to marshal this string as ANSI or system-dependent, specify MarshalAs explicitly, and set BestFitMapping=false; for added security, also set ThrowOnUnmappableChar=true. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182319(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildOccurredEventArgs - #BuildTransition |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'BuildOccurredEventArgs.BuildTransition' or change the field to one that is an immutable reference type. If the reference type 'BuildTransition' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildOccurredEventArgs - #BuildTransition |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BuildOccurredEventArgs.BuildTransition' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildOccurredEventArgs - #ProjectStatus |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'BuildOccurredEventArgs.ProjectStatus' or change the field to one that is an immutable reference type. If the reference type 'ProjectStatus' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildOccurredEventArgs - #ProjectStatus |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BuildOccurredEventArgs.ProjectStatus' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib - BuildOccurredEventHandler |
Breaking |
95 %
|
Use generic event handler instances |
|
| Rule: |
Use generic event handler instances |
| Check Id: |
CA1003 |
| Category: |
Microsoft.Design |
| Description: |
Do not declare new delegates to be used as event handlers when targeting a version of the .NET Framework that supports generics. Use an instance EventHandler<T> instead. |
| Found at: |
|
| Resolution: |
Remove 'BuildOccurredEventHandler' and replace its usage with EventHandler<T> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182178(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransition - #Broken |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'BuildTransition.Broken' or change the field to one that is an immutable reference type. If the reference type 'BuildTransition' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransition - #Fixed |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'BuildTransition.Fixed' or change the field to one that is an immutable reference type. If the reference type 'BuildTransition' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransition - #StillFailing |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'BuildTransition.StillFailing' or change the field to one that is an immutable reference type. If the reference type 'BuildTransition' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransition - #StillSuccessful |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'BuildTransition.StillSuccessful' or change the field to one that is an immutable reference type. If the reference type 'BuildTransition' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTimeFormatter - #AddIfNeeded(System.Text.StringBuilder,System.Int32,System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\CCTimeFormatter.cs at line 29 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'CCTimeFormatter.AddIfNeeded(StringBuilder, int, string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTimeFormatter - #ToString() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\CCTimeFormatter.cs at line 18 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CCTimeFormatter.ToString()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib - CCTrayLibException |
Breaking |
75 %
|
Types should not extend certain base types |
|
| Rule: |
Types should not extend certain base types |
| Check Id: |
CA1058 |
| Category: |
Microsoft.Design |
| Description: |
It is best not to extend some base types or to prefer extending better alternatives to those base types. |
| Found at: |
|
| Resolution: |
Change the base type of 'CCTrayLibException' so that it no longer extends 'ApplicationException'. This base exception type does not provide any additional value for framework classes. Extend 'System.Exception' or an existing unsealed exception type instead. Do not create a new exception base type unless there is specific value in enabling the creation of a catch handler for an entire class of exceptions. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182171(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayLibException - #.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) |
NonBreaking |
95 %
|
Implement standard exception constructors |
|
| Rule: |
Implement standard exception constructors |
| Check Id: |
CA1032 |
| Category: |
Microsoft.Design |
| Description: |
Multiple constructors are required to correctly implement a custom exception. Missing constructors can make your exception unusable in certain scenarios. For example, the serialization constructor is required for handling exceptions in XML Web services. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\CCTrayLibException.cs at line 12 |
| Resolution: |
Change the accessibility of 'CCTrayLibException.CCTrayLibException(SerializationInfo, StreamingContext)' to protected. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182151(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayLibException - #.ctor(System.String) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\CCTrayLibException.cs at line 10 |
| Resolution: |
In method 'CCTrayLibException.CCTrayLibException(string)', consider providing a more meaningful name than parameter name 's'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayLibException - #.ctor(System.String,System.Exception) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\CCTrayLibException.cs at line 11 |
| Resolution: |
In method 'CCTrayLibException.CCTrayLibException(string, Exception)', consider providing a more meaningful name than parameter name 'e'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayLibException - #.ctor(System.String,System.Exception) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\CCTrayLibException.cs at line 11 |
| Resolution: |
In method 'CCTrayLibException.CCTrayLibException(string, Exception)', consider providing a more meaningful name than parameter name 's'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ErrorLevel - #Error |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ErrorLevel.Error' or change the field to one that is an immutable reference type. If the reference type 'ErrorLevel' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ErrorLevel - #Info |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ErrorLevel.Info' or change the field to one that is an immutable reference type. If the reference type 'ErrorLevel' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ErrorLevel - #Warning |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ErrorLevel.Warning' or change the field to one that is an immutable reference type. If the reference type 'ErrorLevel' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib - IconNotFoundException |
Breaking |
75 %
|
Types should not extend certain base types |
|
| Rule: |
Types should not extend certain base types |
| Check Id: |
CA1058 |
| Category: |
Microsoft.Design |
| Description: |
It is best not to extend some base types or to prefer extending better alternatives to those base types. |
| Found at: |
|
| Resolution: |
Change the base type of 'IconNotFoundException' so that it no longer extends 'ApplicationException'. This base exception type does not provide any additional value for framework classes. Extend 'System.Exception' or an existing unsealed exception type instead. Do not create a new exception base type unless there is specific value in enabling the creation of a catch handler for an entire class of exceptions. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182171(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IconNotFoundException - #.ctor(System.String,System.Exception) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\IconNotFoundException.cs at line 17 |
| Resolution: |
In method 'IconNotFoundException.IconNotFoundException(string, Exception)', consider providing a more meaningful name than parameter name 'e'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib - NotifyInfoFlags2 |
Breaking |
95 %
|
Use preferred terms |
|
| Rule: |
Use preferred terms |
| Check Id: |
CA1726 |
| Category: |
Microsoft.Naming |
| Description: |
Use preferred terms over deprecated alternates. |
| Found at: |
|
| Resolution: |
Replace the term 'Flags' in type name 'NotifyInfoFlags2' with an appropriate alternate or remove it entirely. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182258(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib - StatusIcon |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
|
| Resolution: |
Provide an overridable implementation of Dispose(bool) on 'StatusIcon' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
StatusIcon - #.ctor(System.Drawing.Icon,System.Boolean) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\StatusIcon.cs at line 13 |
| Resolution: |
In method 'StatusIcon.StatusIcon(Icon, bool)', consider providing a more meaningful name than parameter name 'i'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
StatusIcon - #Dispose() |
NonBreaking |
75 %
|
Call GC.SuppressFinalize correctly |
|
| Rule: |
Call GC.SuppressFinalize correctly |
| Check Id: |
CA1816 |
| Category: |
Microsoft.Usage |
| Description: |
Call GC.SuppressFinalize to suppress finalization of your instance once Dispose has been called. Objects that implement IDisposable should call SuppressFinalize from the IDisposable.Dispose method to prevent the garbage collector from calling Object.Finalize on an object that does not require it. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\StatusIcon.cs at line 31 |
| Resolution: |
Change 'StatusIcon.Dispose()' to call 'GC.SuppressFinalize(object)'. This will prevent unnecessary finalization of the object once it has been disposed and it has fallen out of scope. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182269(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
StatusIcon - #Dispose() |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\StatusIcon.cs at line 31 |
| Resolution: |
Modify 'StatusIcon.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
StatusIcon - #LoadFromFile(System.String) |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\StatusIcon.cs at line 44 |
| Resolution: |
'StatusIcon.LoadFromFile(string)' calls into 'Bitmap.GetHicon()' which has a LinkDemand. By making this call, 'Bitmap.GetHicon()' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'StatusIcon.LoadFromFile(string)'
->'StatusIcon.LoadFromFile(string)' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
AudioFiles - #BrokenBuildSound |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'AudioFiles.BrokenBuildSound' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AudioFiles - #FixedBuildSound |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'AudioFiles.FixedBuildSound' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AudioFiles - #StillFailingBuildSound |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'AudioFiles.StillFailingBuildSound' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AudioFiles - #StillSuccessfulBuildSound |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'AudioFiles.StillSuccessfulBuildSound' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BalloonMessages - #BrokenBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BalloonMessages.BrokenBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BalloonMessages - #FixedBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BalloonMessages.FixedBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BalloonMessages - #StillFailingBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BalloonMessages.StillFailingBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BalloonMessages - #StillSuccessfulBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BalloonMessages.StillSuccessfulBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServer - #.ctor(System.String) |
DependsOnFix |
95 %
|
Specify CultureInfo |
|
| Rule: |
Specify CultureInfo |
| Check Id: |
CA1304 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a CultureInfo argument, it should always be called in favor of an overload that does not. The CultureInfo type contains culture-specific information required for performing numeric and string operations, such as casing, formatting, and string comparisons. In scenarios where conversion and parsing behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\BuildServer.cs at line 25 |
| Resolution: |
Because the behavior of 'string.ToLower()' could vary based on the current user's locale settings, replace this call in 'BuildServer.BuildServer(string)' with a call to 'string.ToLower(CultureInfo)'. If the result of 'string.ToLower(CultureInfo)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'CultureInfo' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182189(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServer - #.ctor(System.String) |
Breaking |
60 %
|
URI parameters should not be strings |
|
| Rule: |
URI parameters should not be strings |
| Check Id: |
CA1054 |
| Category: |
Microsoft.Design |
| Description: |
If a parameter name contains "uri" or "url" or "urn", and it's typed as string, the parameter type should be changed to System.Uri, unless there is an overload method where the same parameter is typed as System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\BuildServer.cs at line 11 |
| Resolution: |
Change the type of parameter 'url' of method 'BuildServer.BuildServer(string)' from string to System.Uri, or provide an overload of 'BuildServer.BuildServer(string)', that allows 'url' to be passed as a System.Uri object. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182174(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServer - #.ctor(System.String,ThoughtWorks.CruiseControl.CCTrayLib.Configuration.BuildServerTransport,System.String,System.String) |
Breaking |
60 %
|
URI parameters should not be strings |
|
| Rule: |
URI parameters should not be strings |
| Check Id: |
CA1054 |
| Category: |
Microsoft.Design |
| Description: |
If a parameter name contains "uri" or "url" or "urn", and it's typed as string, the parameter type should be changed to System.Uri, unless there is an overload method where the same parameter is typed as System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\BuildServer.cs at line 11 |
| Resolution: |
Change the type of parameter 'url' of method 'BuildServer.BuildServer(string, BuildServerTransport, string, string)' from string to System.Uri, or provide an overload of 'BuildServer.BuildServer(string, BuildServerTransport, string, string)', that allows 'url' to be passed as a System.Uri object. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182174(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServer - #BuildFromRemotingDisplayName(System.String) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\BuildServer.cs at line 123 |
| Resolution: |
'BuildServer.BuildFromRemotingDisplayName(string)' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServer - #BuildFromRemotingDisplayName(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\BuildServer.cs at line 118 |
| Resolution: |
Because the behavior of 'Convert.ToInt32(string)' could vary based on the current user's locale settings, replace this call in 'BuildServer.BuildFromRemotingDisplayName(string)' with a call to 'Convert.ToInt32(string, IFormatProvider)'. If the result of 'Convert.ToInt32(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServer - #BuildFromRemotingDisplayName(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\BuildServer.cs at line 112 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'BuildServer.BuildFromRemotingDisplayName(string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServer - #Url |
Breaking |
75 %
|
URI properties should not be strings |
|
| Rule: |
URI properties should not be strings |
| Check Id: |
CA1056 |
| Category: |
Microsoft.Design |
| Description: |
If a property name contains "uri" or "url" or "urn" and it's typed as string, it should be changed to System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\BuildServer.cs at line 49 |
| Resolution: |
Change the type of property 'BuildServer.Url' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182175(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildServerTransport - #HTTP |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'HTTP' in member name 'BuildServerTransport.HTTP' by changing it to 'Http'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransitionNotification - #AudioFiles |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BuildTransitionNotification.AudioFiles' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransitionNotification - #BalloonMessages |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BuildTransitionNotification.BalloonMessages' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransitionNotification - #Exec |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BuildTransitionNotification.Exec' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransitionNotification - #MinimumNotificationLevel |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BuildTransitionNotification.MinimumNotificationLevel' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransitionNotification - #ShowBalloon |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'BuildTransitionNotification.ShowBalloon' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CaptionAndMessage - #Caption |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'CaptionAndMessage.Caption' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CaptionAndMessage - #Message |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'CaptionAndMessage.Message' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayMultiConfiguration - #GetServerMonitorForProject(ThoughtWorks.CruiseControl.CCTrayLib.Configuration.CCTrayProject,System.Collections.Generic.IEnumerable`1<ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ISingleServerMonitor>) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\CCTrayMultiConfiguration.cs at line 64 |
| Resolution: |
'CCTrayMultiConfiguration.GetServerMonitorForProject(CCTrayProject, IEnumerable<ISingleServerMonitor>)' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayProject - #.ctor(System.String,System.String) |
Breaking |
60 %
|
URI parameters should not be strings |
|
| Rule: |
URI parameters should not be strings |
| Check Id: |
CA1054 |
| Category: |
Microsoft.Design |
| Description: |
If a parameter name contains "uri" or "url" or "urn", and it's typed as string, the parameter type should be changed to System.Uri, unless there is an overload method where the same parameter is typed as System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\CCTrayProject.cs at line 18 |
| Resolution: |
Change the type of parameter 'serverUrl' of method 'CCTrayProject.CCTrayProject(string, string)' from string to System.Uri, or provide an overload of 'CCTrayProject.CCTrayProject(string, string)', that allows 'serverUrl' to be passed as a System.Uri object. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182174(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayProject - #ServerUrl |
Breaking |
75 %
|
URI properties should not be strings |
|
| Rule: |
URI properties should not be strings |
| Check Id: |
CA1056 |
| Category: |
Microsoft.Design |
| Description: |
If a property name contains "uri" or "url" or "urn" and it's typed as string, it should be changed to System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Configuration\CCTrayProject.cs at line 36 |
| Resolution: |
Change the type of property 'CCTrayProject.ServerUrl' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182175(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ExecCommands - #BrokenAndBuildingCommand |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'ExecCommands.BrokenAndBuildingCommand' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ExecCommands - #BrokenCommand |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'ExecCommands.BrokenCommand' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ExecCommands - #BuildingCommand |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'ExecCommands.BuildingCommand' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ExecCommands - #NotConnectedCommand |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'ExecCommands.NotConnectedCommand' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ExecCommands - #SuccessCommand |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'ExecCommands.SuccessCommand' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Configuration - ExtensionAttribute |
Breaking |
75 %
|
Avoid unsealed attributes |
|
| Rule: |
Avoid unsealed attributes |
| Check Id: |
CA1813 |
| Category: |
Microsoft.Performance |
| Description: |
Seal attribute types for improved performance. Sealing attribute types speeds up performance during reflection on custom attributes. |
| Found at: |
|
| Resolution: |
Seal 'ExtensionAttribute', if possible. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182267(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Configuration - ExtensionAttribute |
Breaking |
95 %
|
Mark attributes with AttributeUsageAttribute |
|
| Rule: |
Mark attributes with AttributeUsageAttribute |
| Check Id: |
CA1018 |
| Category: |
Microsoft.Design |
| Description: |
The AttributeUsage attribute specifies the targets that are valid for the attribute (see System.AttributeTargets), whether an attribute can appear on a target more than once, and whether the attribute is inheritable. |
| Found at: |
|
| Resolution: |
Specify AttributeUsage on 'ExtensionAttribute'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182158(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlConfiguration - #Enabled |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlConfiguration.Enabled' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlConfiguration - #Hostname |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
|
| Resolution: |
The discrete term 'Hostname' in member name 'GrowlConfiguration.Hostname' should be expressed as a compound word, 'HostName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlConfiguration - #Hostname |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlConfiguration.Hostname' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlConfiguration - #MinimumNotificationLevel |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlConfiguration.MinimumNotificationLevel' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlConfiguration - #Password |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlConfiguration.Password' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlConfiguration - #Port |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlConfiguration.Port' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ICCTrayMultiConfiguration - #Projects |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
|
| Resolution: |
Change 'ICCTrayMultiConfiguration.Projects' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Icons - #BrokenAndBuildingIcon |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Icons.BrokenAndBuildingIcon' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Icons - #BrokenIcon |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Icons.BrokenIcon' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Icons - #BuildingIcon |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Icons.BuildingIcon' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Icons - #NotConnectedIcon |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Icons.NotConnectedIcon' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Icons - #SuccessIcon |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Icons.SuccessIcon' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #AlwaysOnTop |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.AlwaysOnTop' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #BuildTransitionNotification |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.BuildTransitionNotification' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #FixUserName |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.FixUserName' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #Growl |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.Growl' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #Icons |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.Icons' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #PollPeriodSeconds |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.PollPeriodSeconds' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #Projects |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.Projects' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #ReportProjectChanges |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.ReportProjectChanges' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #ShowInTaskbar |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.ShowInTaskbar' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #Speech |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.Speech' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #TrayIconDoubleClickAction |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.TrayIconDoubleClickAction' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PersistentConfiguration - #X10 |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'PersistentConfiguration.X10' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechConfiguration - #Enabled |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'SpeechConfiguration.Enabled' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechConfiguration - #SpeakBuildFailed |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'SpeechConfiguration.SpeakBuildFailed' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechConfiguration - #SpeakBuildStarted |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'SpeechConfiguration.SpeakBuildStarted' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechConfiguration - #SpeakBuildSucceded |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'SpeechConfiguration.SpeakBuildSucceded' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #ActiveDays |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.ActiveDays' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #BuildingUnitCode |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.BuildingUnitCode' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #ComPort |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.ComPort' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #DeviceType |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.DeviceType' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #Enabled |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.Enabled' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #EndTime |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.EndTime' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #FailureUnitCode |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.FailureUnitCode' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #HouseCode |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.HouseCode' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #StartTime |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.StartTime' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10Configuration - #SuccessUnitCode |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'X10Configuration.SuccessUnitCode' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlController - #Monitor_BuildOccurred(System.Object,ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.MonitorBuildOccurredEventArgs) |
NonBreaking |
95 %
|
Do not ignore method results |
|
| Rule: |
Do not ignore method results |
| Check Id: |
CA1806 |
| Category: |
Microsoft.Usage |
| Description: |
The result of methods that return new instances of strings should be assigned to a variable and subsequently used. If the result of a method that creates a new object, such as String.ToLower(), is not assigned to a variable, the call is wasted. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Growl\GrowlController.cs at line 85 |
| Resolution: |
'GrowlController.Monitor_BuildOccurred(object, MonitorBuildOccurredEventArgs)' calls 'string.Format(string, object, object)' but does not use the new string instance that the method returns. Pass the instance as an argument to another method, assign the instance to a variable, or remove the call if it is unnecessary. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182273(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlController - #Monitor_BuildOccurred(System.Object,ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.MonitorBuildOccurredEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Growl\GrowlController.cs at line 85 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'GrowlController.Monitor_BuildOccurred(object, MonitorBuildOccurredEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlMessages - #BrokenBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlMessages.BrokenBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlMessages - #FixedBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlMessages.FixedBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlMessages - #StillFailingBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlMessages.StillFailingBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlMessages - #StillSuccessfulBuildMessage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GrowlMessages.StillSuccessfulBuildMessage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AggregatingProjectMonitor - #GetIntegrationStatusImportance(ThoughtWorks.CruiseControl.Remote.IntegrationStatus) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\AggregatingProjectMonitor.cs at line 175 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'AggregatingProjectMonitor.GetIntegrationStatusImportance(IntegrationStatus)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
#IsConnected - #get_IsConnected() |
Breaking |
90 %
|
Do not raise exceptions in unexpected locations |
|
| Rule: |
Do not raise exceptions in unexpected locations |
| Check Id: |
CA1065 |
| Category: |
Microsoft.Design |
| Description: |
Do not explicitly raise exceptions from unexpected locations. There are some methods, such as Equals and GetHashCode, which users do not expect to raise exceptions. Therefore calls to these methods are not commonly wrapped in try catch blocks. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\AggregatingProjectMonitor.cs at line 170 |
| Resolution: |
'AggregatingProjectMonitor.IsConnected.get()' creates an exception of type 'NotImplementedException', an exception type that should not be raised in a property. If this exception instance might be raised, use a different exception type, convert this property into a method, or change this property's logic so that it no longer raises an exception. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386039(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AggregatingProjectMonitor - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\AggregatingProjectMonitor.cs at line 231 |
| Resolution: |
Change 'List<ParameterBase>' in 'AggregatingProjectMonitor.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
#ProjectIntegratorState - #get_ProjectIntegratorState() |
Breaking |
90 %
|
Do not raise exceptions in unexpected locations |
|
| Rule: |
Do not raise exceptions in unexpected locations |
| Check Id: |
CA1065 |
| Category: |
Microsoft.Design |
| Description: |
Do not explicitly raise exceptions from unexpected locations. There are some methods, such as Equals and GetHashCode, which users do not expect to raise exceptions. Therefore calls to these methods are not commonly wrapped in try catch blocks. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\AggregatingProjectMonitor.cs at line 86 |
| Resolution: |
'AggregatingProjectMonitor.ProjectIntegratorState.get()' creates an exception of type 'NotImplementedException', an exception type that should not be raised in a property. If this exception instance might be raised, use a different exception type, convert this property into a method, or change this property's logic so that it no longer raises an exception. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386039(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseProjectManagerFactory - #Create(ThoughtWorks.CruiseControl.CCTrayLib.Configuration.CCTrayProject,System.Collections.Generic.IDictionary`2<ThoughtWorks.CruiseControl.CCTrayLib.Configuration.BuildServer,ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ICruiseServerManager>) |
Breaking |
95 %
|
Parameter names should match base declaration |
|
| Rule: |
Parameter names should match base declaration |
| Check Id: |
CA1725 |
| Category: |
Microsoft.Naming |
| Description: |
For usability reasons, parameter names in overridden methods should match those of the base declaration. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\CruiseProjectManagerFactory.cs at line 18 |
| Resolution: |
In member 'CruiseProjectManagerFactory.Create(CCTrayProject, IDictionary<BuildServer, ICruiseServerManager>)', change parameter name 'serverManagers' to 'list' in order to match the identifier as it has been declared in 'ICruiseProjectManagerFactory.Create(CCTrayProject, IDictionary<BuildServer, ICruiseServerManager>)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182251(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardCruiseServerSnapshot - #Projects |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardCruiseServerSnapshot.Projects' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardCruiseServerSnapshot - #Queues |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardCruiseServerSnapshot.Queues' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #activity |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.activity' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #buildStage |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.buildStage' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #category |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.category' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #lastBuildLabel |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.lastBuildLabel' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #lastBuildStatus |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.lastBuildStatus' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #lastBuildTime |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.lastBuildTime' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #name |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.name' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #nextBuildTime |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.nextBuildTime' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #queue |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.queue' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #queuePriority |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.queuePriority' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #serverName |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.serverName' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #status |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.status' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProject - #webUrl |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProject.webUrl' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardProjects - #Projects |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardProjects.Projects' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardQueue - #Name |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardQueue.Name' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardQueue - #Requests |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardQueue.Requests' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardQueuedRequest - #Activity |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardQueuedRequest.Activity' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardQueuedRequest - #ProjectName |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'DashboardQueuedRequest.ProjectName' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardXmlParser - #ConvertDashboardQueues(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.DashboardQueue[]) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\DashboardXmlParser.cs at line 177 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'DashboardXmlParser.ConvertDashboardQueues(DashboardQueue[])' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardXmlParser - #ExtractAsCruiseServerSnapshot(System.String) |
NonBreaking |
95 %
|
Specify StringComparison |
|
| Rule: |
Specify StringComparison |
| Check Id: |
CA1307 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a StringComparison argument, it should always be called in favor of an overload that does not. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\DashboardXmlParser.cs at line 117 |
| Resolution: |
'DashboardXmlParser.ExtractAsCruiseServerSnapshot(string)' makes a call to 'string.IndexOf(string)' that does not explicitly provide a StringComparison. This should be replaced with a call to 'string.IndexOf(string, StringComparison)'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386080(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
DashboardXmlParser - #GetIntegratorStateFromString(System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\DashboardXmlParser.cs at line 206 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'DashboardXmlParser.GetIntegratorStateFromString(string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ExtensionHelpers - #QueryAssembliesForTypes(System.String,System.String) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ExtensionHelpers.cs at line 37 |
| Resolution: |
Modify 'ExtensionHelpers.QueryAssembliesForTypes(string, string)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ExtensionHelpers - #RetrieveAuthenticationMode(System.String) |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ExtensionHelpers.cs at line 64 |
| Resolution: |
'extensionInstance', a variable, is cast to type 'IAuthenticationMode' multiple times in method 'ExtensionHelpers.RetrieveAuthenticationMode(string)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant isint instruction. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182271(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ExtensionHelpers - #RetrieveExtension(System.String) |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ExtensionHelpers.cs at line 52 |
| Resolution: |
'extensionInstance', a variable, is cast to type 'ITransportExtension' multiple times in method 'ExtensionHelpers.RetrieveExtension(string)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant isint instruction. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182271(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ExtensionHelpers - #RetrieveType(System.String) |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ExtensionHelpers.cs at line 96 |
| Resolution: |
'ExtensionHelpers.RetrieveType(string)' calls into 'AppDomain.AssemblyResolve.add(ResolveEventHandler)' which has a LinkDemand. By making this call, 'AppDomain.AssemblyResolve.add(ResolveEventHandler)' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'ExtensionHelpers.RetrieveType(string)'
->'ExtensionHelpers.RetrieveType(string)'
->'ExtensionHelpers.CheckForDisplayName(string)' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
HttpCruiseProjectManager - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\HttpCruiseProjectManager.cs at line 107 |
| Resolution: |
Change 'List<ParameterBase>' in 'HttpCruiseProjectManager.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
HttpCruiseProjectManager - #serverManager |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'HttpCruiseProjectManager.serverManager' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ICruiseProjectManager - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<ParameterBase>' in 'ICruiseProjectManager.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ICruiseServerManager - #GetCruiseServerSnapshot() |
Breaking |
50 %
|
Use properties where appropriate |
|
| Rule: |
Use properties where appropriate |
| Check Id: |
CA1024 |
| Category: |
Microsoft.Design |
| Description: |
Properties should be used instead of Get/Set methods in most situations. Methods are preferable to properties in the following situations: the operation is a conversion, is expensive or has an observable side-effect; the order of execution is important; calling the member twice in succession creates different results; a member is static but returns a mutable value; or the member returns an array. |
| Found at: |
|
| Resolution: |
Change 'ICruiseServerManager.GetCruiseServerSnapshot()' to a property if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182181(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ICruiseServerManager - #Login() |
Breaking |
95 %
|
Use preferred terms |
|
| Rule: |
Use preferred terms |
| Check Id: |
CA1726 |
| Category: |
Microsoft.Naming |
| Description: |
Use preferred terms over deprecated alternates. |
| Found at: |
|
| Resolution: |
Replace the term 'Login' in member name 'ICruiseServerManager.Login()' with the preferred alternate 'LogOn'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182258(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ICruiseServerManager - #Logout() |
Breaking |
95 %
|
Use preferred terms |
|
| Rule: |
Use preferred terms |
| Check Id: |
CA1726 |
| Category: |
Microsoft.Naming |
| Description: |
Use preferred terms over deprecated alternates. |
| Found at: |
|
| Resolution: |
Replace the term 'Logout' in member name 'ICruiseServerManager.Logout()' with the preferred alternate 'LogOff'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182258(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #Building |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueNodeType.Building' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueNodeType' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #CheckingModifications |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueNodeType.CheckingModifications' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueNodeType' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #HttpServer |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueNodeType.HttpServer' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueNodeType' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #ImageIndex |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'IntegrationQueueNodeType.ImageIndex' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #Name |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'IntegrationQueueNodeType.Name' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #PendingInQueue |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueNodeType.PendingInQueue' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueNodeType' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #QueueEmpty |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueNodeType.QueueEmpty' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueNodeType' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #QueuePopulated |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueNodeType.QueuePopulated' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueNodeType' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueNodeType - #RemotingServer |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueNodeType.RemotingServer' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueNodeType' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IProjectMonitor - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<ParameterBase>' in 'IProjectMonitor.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IProjectMonitor - #MessageReceived |
Breaking |
95 %
|
Declare event handlers correctly |
|
| Rule: |
Declare event handlers correctly |
| Check Id: |
CA1009 |
| Category: |
Microsoft.Design |
| Description: |
By convention, .NET events have two parameters that specify the event sender and event data. Event handler signatures should follow this form: void MyEventHandler(object sender, EventArgs e). The 'sender' parameter is always of type System.Object, even if it is possible to employ a more specific type. The 'e' parameter is always of type System.EventArgs. Events that do not provide event data should use the System.EventHandler delegate type. Event handlers return void so that they can send each event to multiple target methods. Any value returned by a target would be lost after the first call. |
| Found at: |
|
| Resolution: |
Declare the first parameter of 'MessageEventHandler' as an object named 'sender'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182133(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IProjectMonitor - #Polled |
Breaking |
95 %
|
Declare event handlers correctly |
|
| Rule: |
Declare event handlers correctly |
| Check Id: |
CA1009 |
| Category: |
Microsoft.Design |
| Description: |
By convention, .NET events have two parameters that specify the event sender and event data. Event handler signatures should follow this form: void MyEventHandler(object sender, EventArgs e). The 'sender' parameter is always of type System.Object, even if it is possible to employ a more specific type. The 'e' parameter is always of type System.EventArgs. Events that do not provide event data should use the System.EventHandler delegate type. Event handlers return void so that they can send each event to multiple target methods. Any value returned by a target would be lost after the first call. |
| Found at: |
|
| Resolution: |
Declare the second parameter of 'MonitorPolledEventHandler' as an EventArgs, or an instance of a type that extends EventArgs, named 'e'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182133(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IServerMonitor - #Polled |
Breaking |
95 %
|
Declare event handlers correctly |
|
| Rule: |
Declare event handlers correctly |
| Check Id: |
CA1009 |
| Category: |
Microsoft.Design |
| Description: |
By convention, .NET events have two parameters that specify the event sender and event data. Event handler signatures should follow this form: void MyEventHandler(object sender, EventArgs e). The 'sender' parameter is always of type System.Object, even if it is possible to employ a more specific type. The 'e' parameter is always of type System.EventArgs. Events that do not provide event data should use the System.EventHandler delegate type. Event handlers return void so that they can send each event to multiple target methods. Any value returned by a target would be lost after the first call. |
| Found at: |
|
| Resolution: |
Declare the second parameter of 'MonitorServerPolledEventHandler' as an EventArgs, or an instance of a type that extends EventArgs, named 'e'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182133(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ISingleProjectDetail - #Messages |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
|
| Resolution: |
Change 'ISingleProjectDetail.Messages' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ISingleProjectDetail - #WebURL |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'URL' in member name 'ISingleProjectDetail.WebURL' by changing it to 'Url'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ISingleProjectDetail - #WebURL |
Breaking |
75 %
|
URI properties should not be strings |
|
| Rule: |
URI properties should not be strings |
| Check Id: |
CA1056 |
| Category: |
Microsoft.Design |
| Description: |
If a property name contains "uri" or "url" or "urn" and it's typed as string, it should be changed to System.Uri. |
| Found at: |
|
| Resolution: |
Change the type of property 'ISingleProjectDetail.WebURL' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182175(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ISingleServerMonitor - #ServerUrl |
Breaking |
75 %
|
URI properties should not be strings |
|
| Rule: |
URI properties should not be strings |
| Check Id: |
CA1056 |
| Category: |
Microsoft.Design |
| Description: |
If a property name contains "uri" or "url" or "urn" and it's typed as string, it should be changed to System.Uri. |
| Found at: |
|
| Resolution: |
Change the type of property 'ISingleServerMonitor.ServerUrl' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182175(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ISingleServerMonitor - #Stop() |
Breaking |
95 %
|
Identifiers should not match keywords |
|
| Rule: |
Identifiers should not match keywords |
| Check Id: |
CA1716 |
| Category: |
Microsoft.Naming |
| Description: |
Identifiers which conflict with reserved language keywords should be avoided. Using a reserved keyword as an identifier makes it harder for consumers in other languages to use your API. |
| Found at: |
|
| Resolution: |
Rename virtual/interface member 'ISingleServerMonitor.Stop()' so that it no longer conflicts with the reserved language keyword 'Stop'. Using a reserved keyword as the name of a virtual/interface member makes it harder for consumers in other languages to override/implement the member. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182248(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ISingleServerMonitor - #ServerSnapshotChanged |
Breaking |
95 %
|
Declare event handlers correctly |
|
| Rule: |
Declare event handlers correctly |
| Check Id: |
CA1009 |
| Category: |
Microsoft.Design |
| Description: |
By convention, .NET events have two parameters that specify the event sender and event data. Event handler signatures should follow this form: void MyEventHandler(object sender, EventArgs e). The 'sender' parameter is always of type System.Object, even if it is possible to employ a more specific type. The 'e' parameter is always of type System.EventArgs. Events that do not provide event data should use the System.EventHandler delegate type. Event handlers return void so that they can send each event to multiple target methods. Any value returned by a target would be lost after the first call. |
| Found at: |
|
| Resolution: |
Declare the second parameter of 'ServerSnapshotChangedEventHandler' as an EventArgs, or an instance of a type that extends EventArgs, named 'e'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182133(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IWebRetriever - #Get(System.Uri) |
Breaking |
95 %
|
Identifiers should not match keywords |
|
| Rule: |
Identifiers should not match keywords |
| Check Id: |
CA1716 |
| Category: |
Microsoft.Naming |
| Description: |
Identifiers which conflict with reserved language keywords should be avoided. Using a reserved keyword as an identifier makes it harder for consumers in other languages to use your API. |
| Found at: |
|
| Resolution: |
Rename virtual/interface member 'IWebRetriever.Get(Uri)' so that it no longer conflicts with the reserved language keyword 'Get'. Using a reserved keyword as the name of a virtual/interface member makes it harder for consumers in other languages to override/implement the member. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182248(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorBuildOccurredEventArgs - #BuildTransition |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'MonitorBuildOccurredEventArgs.BuildTransition' or change the field to one that is an immutable reference type. If the reference type 'BuildTransition' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorBuildOccurredEventArgs - #BuildTransition |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'MonitorBuildOccurredEventArgs.BuildTransition' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorBuildOccurredEventArgs - #ProjectMonitor |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'MonitorBuildOccurredEventArgs.ProjectMonitor' or change the field to one that is an immutable reference type. If the reference type 'IProjectMonitor' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorBuildOccurredEventArgs - #ProjectMonitor |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'MonitorBuildOccurredEventArgs.ProjectMonitor' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Monitoring - MonitorBuildOccurredEventHandler |
Breaking |
95 %
|
Use generic event handler instances |
|
| Rule: |
Use generic event handler instances |
| Check Id: |
CA1003 |
| Category: |
Microsoft.Design |
| Description: |
Do not declare new delegates to be used as event handlers when targeting a version of the .NET Framework that supports generics. Use an instance EventHandler<T> instead. |
| Found at: |
|
| Resolution: |
Remove 'MonitorBuildOccurredEventHandler' and replace its usage with EventHandler<T> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182178(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorPolledEventArgs - #ProjectMonitor |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'MonitorPolledEventArgs.ProjectMonitor' or change the field to one that is an immutable reference type. If the reference type 'IProjectMonitor' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorPolledEventArgs - #ProjectMonitor |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'MonitorPolledEventArgs.ProjectMonitor' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Monitoring - MonitorPolledEventHandler |
Breaking |
95 %
|
Use generic event handler instances |
|
| Rule: |
Use generic event handler instances |
| Check Id: |
CA1003 |
| Category: |
Microsoft.Design |
| Description: |
Do not declare new delegates to be used as event handlers when targeting a version of the .NET Framework that supports generics. Use an instance EventHandler<T> instead. |
| Found at: |
|
| Resolution: |
Remove 'MonitorPolledEventHandler' and replace its usage with EventHandler<T> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182178(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorServerPolledEventArgs - #ServerMonitor |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'MonitorServerPolledEventArgs.ServerMonitor' or change the field to one that is an immutable reference type. If the reference type 'IServerMonitor' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorServerPolledEventArgs - #ServerMonitor |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'MonitorServerPolledEventArgs.ServerMonitor' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Monitoring - MonitorServerPolledEventHandler |
Breaking |
95 %
|
Use generic event handler instances |
|
| Rule: |
Use generic event handler instances |
| Check Id: |
CA1003 |
| Category: |
Microsoft.Design |
| Description: |
Do not declare new delegates to be used as event handlers when targeting a version of the .NET Framework that supports generics. Use an instance EventHandler<T> instead. |
| Found at: |
|
| Resolution: |
Remove 'MonitorServerPolledEventHandler' and replace its usage with EventHandler<T> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182178(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorServerQueueChangedEventArgs - #ServerMonitor |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'MonitorServerQueueChangedEventArgs.ServerMonitor' or change the field to one that is an immutable reference type. If the reference type 'ISingleServerMonitor' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MonitorServerQueueChangedEventArgs - #ServerMonitor |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'MonitorServerQueueChangedEventArgs.ServerMonitor' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Monitoring - MonitorServerQueueChangedEventHandler |
Breaking |
95 %
|
Use generic event handler instances |
|
| Rule: |
Use generic event handler instances |
| Check Id: |
CA1003 |
| Category: |
Microsoft.Design |
| Description: |
Do not declare new delegates to be used as event handlers when targeting a version of the .NET Framework that supports generics. Use an instance EventHandler<T> instead. |
| Found at: |
|
| Resolution: |
Remove 'MonitorServerQueueChangedEventHandler' and replace its usage with EventHandler<T> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182178(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Monitoring - Poller |
DependsOnFix |
95 %
|
Types that own disposable fields should be disposable |
|
| Rule: |
Types that own disposable fields should be disposable |
| Check Id: |
CA1001 |
| Category: |
Microsoft.Design |
| Description: |
Types that declare disposable members should also implement IDisposable. If the type does not own any unmanaged resources, do not implement a finalizer on it. |
| Found at: |
|
| Resolution: |
Implement IDisposable on 'Poller' because it creates members of the following IDisposable types: 'Timer'. If 'Poller' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182172(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Poller - #.ctor(System.Int32,ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.IPollable) |
NonBreaking |
75 %
|
Operations should not overflow |
|
| Rule: |
Operations should not overflow |
| Check Id: |
CA2233 |
| Category: |
Microsoft.Usage |
| Description: |
Arithmetic operations should not be done without first validating the operands to prevent overflow. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\Poller.cs at line 17 |
| Resolution: |
Correct the potential overflow in the operation 'pollIntervalSeconds*1000' in 'Poller.Poller(int, IPollable)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182354(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
#BuildTransition - #get_BuildTransition() |
Breaking |
90 %
|
Do not raise exceptions in unexpected locations |
|
| Rule: |
Do not raise exceptions in unexpected locations |
| Check Id: |
CA1065 |
| Category: |
Microsoft.Design |
| Description: |
Do not explicitly raise exceptions from unexpected locations. There are some methods, such as Equals and GetHashCode, which users do not expect to raise exceptions. Therefore calls to these methods are not commonly wrapped in try catch blocks. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\PollIntervalReporter.cs at line 90 |
| Resolution: |
'PollIntervalReporter.BuildTransition.get()' creates an exception of type 'Exception', an exception type that should not be raised in a property. If this exception instance might be raised, use a different exception type, convert this property into a method, or change this property's logic so that it no longer raises an exception. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386039(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
#BuildTransition - #get_BuildTransition() |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\PollIntervalReporter.cs at line 90 |
| Resolution: |
'PollIntervalReporter.BuildTransition.get()' creates an exception of type 'Exception', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectMonitor - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ProjectMonitor.cs at line 459 |
| Resolution: |
Change 'List<ParameterBase>' in 'ProjectMonitor.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectMonitor - #Poll() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ProjectMonitor.cs at line 357 |
| Resolution: |
Modify 'ProjectMonitor.Poll()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectState - #Broken |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ProjectState.Broken' or change the field to one that is an immutable reference type. If the reference type 'ProjectState' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectState - #BrokenAndBuilding |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ProjectState.BrokenAndBuilding' or change the field to one that is an immutable reference type. If the reference type 'ProjectState' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectState - #Building |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ProjectState.Building' or change the field to one that is an immutable reference type. If the reference type 'ProjectState' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectState - #ImageIndex |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'ProjectState.ImageIndex' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectState - #Name |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'ProjectState.Name' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectState - #NotConnected |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ProjectState.NotConnected' or change the field to one that is an immutable reference type. If the reference type 'ProjectState' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ProjectState - #Success |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ProjectState.Success' or change the field to one that is an immutable reference type. If the reference type 'ProjectState' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
RemotingCruiseProjectManager - #FixBuild(System.String,System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\RemotingCruiseProjectManager.cs at line 62 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'RemotingCruiseProjectManager.FixBuild(string, string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
RemotingCruiseProjectManager - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\RemotingCruiseProjectManager.cs at line 187 |
| Resolution: |
Change 'List<ParameterBase>' in 'RemotingCruiseProjectManager.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ServerMonitor - #GetProjectStatus(System.String) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ServerMonitor.cs at line 64 |
| Resolution: |
'ServerMonitor.GetProjectStatus(string)' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
ServerMonitor - #Poll() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\ServerMonitor.cs at line 86 |
| Resolution: |
Modify 'ServerMonitor.Poll()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
WebDashboardUrl - #.ctor(System.String) |
Breaking |
60 %
|
URI parameters should not be strings |
|
| Rule: |
URI parameters should not be strings |
| Check Id: |
CA1054 |
| Category: |
Microsoft.Design |
| Description: |
If a parameter name contains "uri" or "url" or "urn", and it's typed as string, the parameter type should be changed to System.Uri, unless there is an overload method where the same parameter is typed as System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebDashboardUrl.cs at line 14 |
| Resolution: |
Change the type of parameter 'serverUrl' of method 'WebDashboardUrl.WebDashboardUrl(string)' from string to System.Uri, or provide an overload of 'WebDashboardUrl.WebDashboardUrl(string)', that allows 'serverUrl' to be passed as a System.Uri object. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182174(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
WebDashboardUrl - #.ctor(System.String,System.String) |
Breaking |
60 %
|
URI parameters should not be strings |
|
| Rule: |
URI parameters should not be strings |
| Check Id: |
CA1054 |
| Category: |
Microsoft.Design |
| Description: |
If a parameter name contains "uri" or "url" or "urn", and it's typed as string, the parameter type should be changed to System.Uri, unless there is an overload method where the same parameter is typed as System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebDashboardUrl.cs at line 21 |
| Resolution: |
Change the type of parameter 'serverUrl' of method 'WebDashboardUrl.WebDashboardUrl(string, string)' from string to System.Uri, or provide an overload of 'WebDashboardUrl.WebDashboardUrl(string, string)', that allows 'serverUrl' to be passed as a System.Uri object. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182174(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
#Security - #get_Security() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebDashboardUrl.cs at line 38 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'WebDashboardUrl.Security.get()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
#ViewFarmReport - #get_ViewFarmReport() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebDashboardUrl.cs at line 33 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'WebDashboardUrl.ViewFarmReport.get()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
WebDashboardUrl - #ViewParametersReport(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebDashboardUrl.cs at line 43 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'WebDashboardUrl.ViewParametersReport(string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
#XmlServerReport - #get_XmlServerReport() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebDashboardUrl.cs at line 28 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'WebDashboardUrl.XmlServerReport.get()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
WebRetriever - #BasicAuthentication(System.Uri) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebRetriever.cs at line 31 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'WebRetriever.BasicAuthentication(Uri)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
WebRetriever - #Get(System.Uri) |
NonBreaking |
95 %
|
Test for empty strings using string length |
|
| Rule: |
Test for empty strings using string length |
| Check Id: |
CA1820 |
| Category: |
Microsoft.Performance |
| Description: |
To test for empty strings, check if String.Length is equal to zero. Constructs such as "".Equals(someString) and String.Empty.Equals(someString) are less efficient than testing the string length. Replace these with checks for someString.Length == 0. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebRetriever.cs at line 15 |
| Resolution: |
Replace the call to 'string.operator !=(string, string)' in 'WebRetriever.Get(Uri)' with a call to 'String.IsNullOrEmpty'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182279(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
WebRetriever - #GetInputString(System.Collections.Specialized.NameValueCollection) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Monitoring\WebRetriever.cs at line 75 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'WebRetriever.GetInputString(NameValueCollection)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
About - #.ctor() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\About.cs at line 16 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'About.About()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
About - #AssemblyCopyright |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\About.cs at line 52 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'About.AssemblyCopyright' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
About - #AssemblyTitle |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\About.cs at line 27 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'About.AssemblyTitle' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
#AssemblyTitle - #get_AssemblyTitle() |
NonBreaking |
95 %
|
Test for empty strings using string length |
|
| Rule: |
Test for empty strings using string length |
| Check Id: |
CA1820 |
| Category: |
Microsoft.Performance |
| Description: |
To test for empty strings, check if String.Length is equal to zero. Constructs such as "".Equals(someString) and String.Empty.Equals(someString) are less efficient than testing the string length. Replace these with checks for someString.Length == 0. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\About.cs at line 31 |
| Resolution: |
Replace the call to 'string.operator !=(string, string)' in 'About.AssemblyTitle.get()' with a call to 'String.IsNullOrEmpty'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182279(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
About - #AssemblyVersion |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\About.cs at line 44 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'About.AssemblyVersion' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
AddBuildServer - #btnOK_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\AddBuildServer.cs at line 530 |
| Resolution: |
Modify 'AddBuildServer.btnOK_Click(object, EventArgs)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AddBuildServer - #ConstructBuildServerFromSelectedOptions() |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\AddBuildServer.cs at line 574 |
| Resolution: |
'AddBuildServer.ConstructBuildServerFromSelectedOptions()' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
AddProjects - #butConfigure_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\AddProjects.cs at line 179 |
| Resolution: |
Change 'AddProjects.butConfigure_Click(object, EventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
AddProjects - #lbProject |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'AddProjects.lbProject' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AddProjects - #lbServer |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'AddProjects.lbServer' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AddProjects - #RetrieveListOfProjects(ThoughtWorks.CruiseControl.CCTrayLib.Configuration.BuildServer) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\AddProjects.cs at line 84 |
| Resolution: |
Modify 'AddProjects.RetrieveListOfProjects(BuildServer)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
AddProjects - #RetrieveListOfProjects(ThoughtWorks.CruiseControl.CCTrayLib.Configuration.BuildServer) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\AddProjects.cs at line 86 |
| Resolution: |
Change 'AddProjects.RetrieveListOfProjects(BuildServer)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
AddProjects - #SetSecurityIcon(System.Windows.Forms.ListViewItem,ThoughtWorks.CruiseControl.CCTrayLib.Configuration.BuildServer) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\AddProjects.cs at line 165 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'AddProjects.SetSecurityIcon(ListViewItem, BuildServer)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildParameters - #.ctor(ThoughtWorks.CruiseControl.CCTrayLib.Presentation.MainFormController,System.Collections.Generic.List`1<ThoughtWorks.CruiseControl.Remote.Parameters.ParameterBase>) |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildParameters.cs at line 19 |
| Resolution: |
Change 'List<ParameterBase>' in 'BuildParameters.BuildParameters(MainFormController, List<ParameterBase>)' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildParameters - #.ctor(ThoughtWorks.CruiseControl.CCTrayLib.Presentation.MainFormController,System.Collections.Generic.List`1<ThoughtWorks.CruiseControl.Remote.Parameters.ParameterBase>) |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildParameters.cs at line 19 |
| Resolution: |
'BuildParameters.BuildParameters(MainFormController, List<ParameterBase>)' calls into 'PropertyGrid.SelectedObject.set(object)' which has a LinkDemand. By making this call, 'PropertyGrid.SelectedObject.set(object)' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'BuildParameters.BuildParameters(MainFormController, List<ParameterBase>)'
->'BuildParameters.BuildParameters(MainFormController, List<ParameterBase>)' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildParameters - #ApplyParameters() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildParameters.cs at line 54 |
| Resolution: |
Because the behavior of 'Convert.ChangeType(object, Type)' could vary based on the current user's locale settings, replace this call in 'BuildParameters.ApplyParameters()' with a call to 'Convert.ChangeType(object, Type, IFormatProvider)'. If the result of 'Convert.ChangeType(object, Type, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildParameters - #AssociateAttribute(System.Reflection.Emit.PropertyBuilder,System.Type,System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildParameters.cs at line 160 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'BuildParameters.AssociateAttribute(PropertyBuilder, Type, string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildParameters - #GenerateEnumeration(System.String,System.String[],System.Reflection.Emit.ModuleBuilder) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildParameters.cs at line 149 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'BuildParameters.GenerateEnumeration(string, string[], ModuleBuilder)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildParameters - #InitializeComponent() |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildParameters.Designer.cs at line 31 |
| Resolution: |
'BuildParameters.InitializeComponent()' calls into 'PropertyGrid.CommandsVisibleIfAvailable.set(bool)' which has a LinkDemand. By making this call, 'PropertyGrid.CommandsVisibleIfAvailable.set(bool)' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'BuildParameters.InitializeComponent()'
->'BuildParameters.InitializeComponent()'
->'BuildParameters.BuildParameters(MainFormController, List<ParameterBase>)' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildParameters - #parameters_PropertyValueChanged(System.Object,System.Windows.Forms.PropertyValueChangedEventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildParameters.cs at line 178 |
| Resolution: |
Change 'BuildParameters.parameters_PropertyValueChanged(object, PropertyValueChangedEventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransitionExecRunner - #Exec(System.String) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildTransitionExecRunner.cs at line 82 |
| Resolution: |
Modify 'BuildTransitionExecRunner.Exec(string)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
BuildTransitionExecRunner - #Exec(System.String) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\BuildTransitionExecRunner.cs at line 85 |
| Resolution: |
Change 'BuildTransitionExecRunner.Exec(string)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayMultiSettingsForm - #loadSettingsButton_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\CCTrayMultiSettingsForm.cs at line 112 |
| Resolution: |
Change 'CCTrayMultiSettingsForm.loadSettingsButton_Click(object, EventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CCTrayMultiSettingsForm - #saveSettingsButton_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\CCTrayMultiSettingsForm.cs at line 89 |
| Resolution: |
Change 'CCTrayMultiSettingsForm.saveSettingsButton_Click(object, EventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Presentation - ConfigurableProjectStateIconProvider |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
|
| Resolution: |
Provide an overridable implementation of Dispose(bool) on 'ConfigurableProjectStateIconProvider' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigurableProjectStateIconProvider - #Dispose() |
NonBreaking |
75 %
|
Call GC.SuppressFinalize correctly |
|
| Rule: |
Call GC.SuppressFinalize correctly |
| Check Id: |
CA1816 |
| Category: |
Microsoft.Usage |
| Description: |
Call GC.SuppressFinalize to suppress finalization of your instance once Dispose has been called. Objects that implement IDisposable should call SuppressFinalize from the IDisposable.Dispose method to prevent the garbage collector from calling Object.Finalize on an object that does not require it. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigurableProjectStateIconProvider.cs at line 17 |
| Resolution: |
Change 'ConfigurableProjectStateIconProvider.Dispose()' to call 'GC.SuppressFinalize(object)'. This will prevent unnecessary finalization of the object once it has been disposed and it has fallen out of scope. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182269(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigurableProjectStateIconProvider - #Dispose() |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigurableProjectStateIconProvider.cs at line 17 |
| Resolution: |
Modify 'ConfigurableProjectStateIconProvider.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigurableProjectStateIconProvider - #LoadIcon(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ProjectState,System.String,ThoughtWorks.CruiseControl.CCTrayLib.StatusIcon) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigurableProjectStateIconProvider.cs at line 46 |
| Resolution: |
Modify 'ConfigurableProjectStateIconProvider.LoadIcon(ProjectState, string, StatusIcon)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigurableProjectStateIconProvider - #LoadIcon(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ProjectState,System.String,ThoughtWorks.CruiseControl.CCTrayLib.StatusIcon) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigurableProjectStateIconProvider.cs at line 48 |
| Resolution: |
Change 'ConfigurableProjectStateIconProvider.LoadIcon(ProjectState, string, StatusIcon)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigureServer - #btnOK_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigureServer.cs at line 128 |
| Resolution: |
Modify 'ConfigureServer.btnOK_Click(object, EventArgs)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigureServer - #btnOK_Click(System.Object,System.EventArgs) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigureServer.cs at line 117 |
| Resolution: |
'ConfigureServer.btnOK_Click(object, EventArgs)' creates an exception of type 'Exception', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigureServer - #btnOK_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigureServer.cs at line 130 |
| Resolution: |
Change 'ConfigureServer.btnOK_Click(object, EventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigureServer - #butConfigureAuth_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigureServer.cs at line 79 |
| Resolution: |
Modify 'ConfigureServer.butConfigureAuth_Click(object, EventArgs)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConfigureServer - #butConfigureAuth_Click(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ConfigureServer.cs at line 81 |
| Resolution: |
Change 'ConfigureServer.butConfigureAuth_Click(object, EventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CurrentStatusWindow - #displayWorker_DoWork(System.Object,System.ComponentModel.DoWorkEventArgs) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\CurrentStatusWindow.cs at line 96 |
| Resolution: |
Modify 'CurrentStatusWindow.displayWorker_DoWork(object, DoWorkEventArgs)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CurrentStatusWindow - #displayWorker_RunWorkerCompleted(System.Object,System.ComponentModel.RunWorkerCompletedEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\CurrentStatusWindow.cs at line 105 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CurrentStatusWindow.displayWorker_RunWorkerCompleted(object, RunWorkerCompletedEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CurrentStatusWindow - #displayWorker_RunWorkerCompleted(System.Object,System.ComponentModel.RunWorkerCompletedEventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\CurrentStatusWindow.cs at line 140 |
| Resolution: |
Change 'CurrentStatusWindow.displayWorker_RunWorkerCompleted(object, RunWorkerCompletedEventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CurrentStatusWindow - #InitializeComponent() |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\CurrentStatusWindow.Designer.cs at line 31 |
| Resolution: |
'CurrentStatusWindow.InitializeComponent()' calls into 'PropertyGrid.CommandsVisibleIfAvailable.set(bool)' which has a LinkDemand. By making this call, 'PropertyGrid.CommandsVisibleIfAvailable.set(bool)' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'CurrentStatusWindow.InitializeComponent()'
->'CurrentStatusWindow.InitializeComponent()'
->'CurrentStatusWindow.CurrentStatusWindow(IProjectMonitor)' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
#ProjectToMonitor - #set_ProjectToMonitor(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.IProjectMonitor) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\CurrentStatusWindow.cs at line 53 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'CurrentStatusWindow.ProjectToMonitor.set(IProjectMonitor)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
DetailStringProvider - #FormatDetailString(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ISingleProjectDetail) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\DetailStringProvider.cs at line 16 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'DetailStringProvider.FormatDetailString(ISingleProjectDetail)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
DetailStringProvider - #GetTimeRemainingMessage(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ISingleProjectDetail) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\DetailStringProvider.cs at line 72 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'DetailStringProvider.GetTimeRemainingMessage(ISingleProjectDetail)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
DisplayChangedProjects - #PopulateProjectList(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ServerSnapshotChangedEventArgs,System.Collections.Generic.IList`1<System.String>,System.Windows.Forms.ListView,System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\DisplayChangedProjects.cs at line 28 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'DisplayChangedProjects.PopulateProjectList(ServerSnapshotChangedEventArgs, IList<string>, ListView, string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
DisplayChangedProjects - #UpdateConfiguration |
Breaking |
95 %
|
Declare event handlers correctly |
|
| Rule: |
Declare event handlers correctly |
| Check Id: |
CA1009 |
| Category: |
Microsoft.Design |
| Description: |
By convention, .NET events have two parameters that specify the event sender and event data. Event handler signatures should follow this form: void MyEventHandler(object sender, EventArgs e). The 'sender' parameter is always of type System.Object, even if it is possible to employ a more specific type. The 'e' parameter is always of type System.EventArgs. Events that do not provide event data should use the System.EventHandler delegate type. Event handlers return void so that they can send each event to multiple target methods. Any value returned by a target would be lost after the first call. |
| Found at: |
|
| Resolution: |
Declare the first parameter of 'Action<List<ServerSnapshotChangedEventArgs>>' as an object named 'sender'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182133(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GeneralSettingsControl - #numPollPeriod |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'GeneralSettingsControl.numPollPeriod' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlSettingsControl - #BindGrowlControls(ThoughtWorks.CruiseControl.CCTrayLib.Configuration.GrowlConfiguration) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\GrowlSettingsControl.cs at line 28 |
| Resolution: |
Because the behavior of 'int.ToString()' could vary based on the current user's locale settings, replace this call in 'GrowlSettingsControl.BindGrowlControls(GrowlConfiguration)' with a call to 'int.ToString(IFormatProvider)'. If the result of 'int.ToString(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlSettingsControl - #PersistGrowlTabSettings(ThoughtWorks.CruiseControl.CCTrayLib.Configuration.GrowlConfiguration) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\GrowlSettingsControl.cs at line 54 |
| Resolution: |
Because the behavior of 'int.Parse(string)' could vary based on the current user's locale settings, replace this call in 'GrowlSettingsControl.PersistGrowlTabSettings(GrowlConfiguration)' with a call to 'int.Parse(string, IFormatProvider)'. If the result of 'int.Parse(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
GrowlSettingsControl - #textBoxPort_Leave(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\GrowlSettingsControl.cs at line 91 |
| Resolution: |
Change 'GrowlSettingsControl.textBoxPort_Leave(object, EventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IAudioPlayer - #Play(System.String) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
|
| Resolution: |
In member 'IAudioPlayer.Play(string)', the discrete term 'filename' in parameter name 'filename' should be expressed as a compound word, 'fileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeAdaptor - #DisplayIntegrationQueueInTreeViewNode() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\IntegrationQueueTreeNodeAdaptor.cs at line 71 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'IntegrationQueueTreeNodeAdaptor.DisplayIntegrationQueueInTreeViewNode()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeTag - #Adaptor |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueTreeNodeTag.Adaptor' or change the field to one that is an immutable reference type. If the reference type 'IntegrationQueueTreeNodeAdaptor' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeTag - #Adaptor |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'IntegrationQueueTreeNodeTag.Adaptor' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeTag - #QueuedRequestSnapshot |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueTreeNodeTag.QueuedRequestSnapshot' or change the field to one that is an immutable reference type. If the reference type 'QueuedRequestSnapshot' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeTag - #QueuedRequestSnapshot |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'IntegrationQueueTreeNodeTag.QueuedRequestSnapshot' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeTag - #QueueIndex |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'IntegrationQueueTreeNodeTag.QueueIndex' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeTag - #QueueSnapshot |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationQueueTreeNodeTag.QueueSnapshot' or change the field to one that is an immutable reference type. If the reference type 'QueueSnapshot' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationQueueTreeNodeTag - #QueueSnapshot |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'IntegrationQueueTreeNodeTag.QueueSnapshot' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm - #GetBuildStage() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 773 |
| Resolution: |
Modify 'MainForm.GetBuildStage()' to catch a more specific exception than 'object' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm - #GetBuildStage() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 775 |
| Resolution: |
Because the behavior of 'StringWriter.StringWriter()' could vary based on the current user's locale settings, replace this call in 'MainForm.GetBuildStage()' with a call to 'StringWriter.StringWriter(IFormatProvider)'. If the result of 'StringWriter.StringWriter(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm - #GetBuildStage() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 752 |
| Resolution: |
Because the behavior of 'StringWriter.StringWriter(StringBuilder)' could vary based on the current user's locale settings, replace this call in 'MainForm.GetBuildStage()' with a call to 'StringWriter.StringWriter(StringBuilder, IFormatProvider)'. If the result of 'StringWriter.StringWriter(StringBuilder, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm - #lvProjects_SelectedIndexChanged(System.Object,System.EventArgs) |
NonBreaking |
95 %
|
Do not ignore method results |
|
| Rule: |
Do not ignore method results |
| Check Id: |
CA1806 |
| Category: |
Microsoft.Usage |
| Description: |
The result of methods that return new instances of strings should be assigned to a variable and subsequently used. If the result of a method that creates a new object, such as String.ToLower(), is not assigned to a variable, the call is wasted. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 726 |
| Resolution: |
'MainForm.lvProjects_SelectedIndexChanged(object, EventArgs)' creates a new instance of 'Timer' which is never used. Pass the instance as an argument to another method, assign the instance to a variable, or remove the object creation if it is unnecessary. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182273(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm - #WndProc(System.Windows.Forms.Message&) |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 944 |
| Resolution: |
'MainForm.WndProc(ref Message)' calls into 'Form.WndProc(ref Message)' which has a LinkDemand. By making this call, 'Form.WndProc(ref Message)' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'MainForm.WndProc(ref Message)'
->'MainForm.WndProc(ref Message)' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm - #WndProc(System.Windows.Forms.Message&) |
Breaking |
33 %
|
Override link demands should be identical to base |
|
| Rule: |
Override link demands should be identical to base |
| Check Id: |
CA2123 |
| Category: |
Microsoft.Security |
| Description: |
If a virtual method has a LinkDemand, in many cases, so should any override of it, and if an override has a LinkDemand, so should the overridden virtual method. Because it is possible to call any of the overrides of a virtual method explicitly, they should all have the same LinkDemand status or, if not, should be reviewed. This also applies to LinkDemand security checks for methods that part of an interface implementation, because the caller might use an interface-typed reference to access the method. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 944 |
| Resolution: |
Add the following security attribute to 'MainForm.WndProc(ref Message)' in order to match a LinkDemand on base method 'Form.WndProc(ref Message)': [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182305(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm+ListViewItemComparer - #.ctor(System.Int32) |
NonBreaking |
75 %
|
Avoid uncalled private code |
|
| Rule: |
Avoid uncalled private code |
| Check Id: |
CA1811 |
| Category: |
Microsoft.Performance |
| Description: |
There is uncalled code that is not externally visible and is not a known runtime entry point. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 1109 |
| Resolution: |
'MainForm.ListViewItemComparer.ListViewItemComparer(int)' appears to have no upstream public or protected callers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182264(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm+ListViewItemComparer - #Compare(System.Object,System.Object) |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 1152 |
| Resolution: |
'x', a parameter, is cast to type 'ListViewItem' multiple times in method 'MainForm.ListViewItemComparer.Compare(object, object)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182271(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainForm+ListViewItemComparer - #Compare(System.Object,System.Object) |
NonBreaking |
95 %
|
Specify StringComparison |
|
| Rule: |
Specify StringComparison |
| Check Id: |
CA1307 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a StringComparison argument, it should always be called in favor of an overload that does not. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainForm.cs at line 1158 |
| Resolution: |
'MainForm.ListViewItemComparer.Compare(object, object)' makes a call to 'string.Compare(string, string)' that does not explicitly provide a StringComparison. This should be replaced with a call to 'string.Compare(string, string, StringComparison)'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386080(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Presentation - MainFormController |
DependsOnFix |
95 %
|
Types that own disposable fields should be disposable |
|
| Rule: |
Types that own disposable fields should be disposable |
| Check Id: |
CA1001 |
| Category: |
Microsoft.Design |
| Description: |
Types that declare disposable members should also implement IDisposable. If the type does not own any unmanaged resources, do not implement a finalizer on it. |
| Found at: |
|
| Resolution: |
Implement IDisposable on 'MainFormController' because it creates members of the following IDisposable types: 'ConfigurableProjectStateIconProvider'. If 'MainFormController' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182172(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #BindToQueueTreeView(ThoughtWorks.CruiseControl.CCTrayLib.Presentation.QueueTreeView) |
Breaking |
50 %
|
Consider passing base types as parameters |
|
| Rule: |
Consider passing base types as parameters |
| Check Id: |
CA1011 |
| Category: |
Microsoft.Design |
| Description: |
Using base types as parameters to methods improves re-use of these methods if you only use methods & properties from the parameter's base class. E.g. use Stream instead of FileStream as a parameter when only calling Stream.Read(), this makes the method work on all kind of streams instead of just File streams. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 254 |
| Resolution: |
Consider changing the type of parameter 'treeView' in 'MainFormController.BindToQueueTreeView(QueueTreeView)' from 'QueueTreeView' to its base type 'TreeView'. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature. |
| Help Link: |
http://msdn2.microsoft.com/library/3hk32yyz(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #DisplayWebPageForProject(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.ISingleProjectDetail) |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 368 |
| Resolution: |
'MainFormController.DisplayWebPageForProject(ISingleProjectDetail)' calls into 'Process.Start(string)' which has a LinkDemand. By making this call, 'Process.Start(string)' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'MainFormController.DisplayWebPageForProject(ISingleProjectDetail)'
->'MainFormController.DisplayWebPageForProject(ISingleProjectDetail)'
->'MainFormController.DisplayWebPage()' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #execRunner |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'MainFormController.execRunner' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #ForceBuild() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 179 |
| Resolution: |
Modify 'MainFormController.ForceBuild()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #ForceBuild() |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 181 |
| Resolution: |
Change 'MainFormController.ForceBuild()' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #ForceBuild(System.Collections.Generic.Dictionary`2<System.String,System.String>) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 200 |
| Resolution: |
Modify 'MainFormController.ForceBuild(Dictionary<string, string>)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #ForceBuild(System.Collections.Generic.Dictionary`2<System.String,System.String>) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 202 |
| Resolution: |
Change 'MainFormController.ForceBuild(Dictionary<string, string>)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #growlController |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'MainFormController.growlController' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 153 |
| Resolution: |
Change 'List<ParameterBase>' in 'MainFormController.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #Monitors |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 90 |
| Resolution: |
Change 'MainFormController.Monitors' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #RunSecureMethod(System.Action`1<System.Boolean>,System.String) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 474 |
| Resolution: |
Modify 'MainFormController.RunSecureMethod(Action<bool>, string)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #RunSecureMethod(System.Action`1<System.Boolean>,System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 472 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'MainFormController.RunSecureMethod(Action<bool>, string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #RunSecureMethod(System.Action`1<System.Boolean>,System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 476 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'MainFormController.RunSecureMethod(Action<bool>, string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #RunSecureMethod(System.Action`1<System.Boolean>,System.String) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 476 |
| Resolution: |
Change 'MainFormController.RunSecureMethod(Action<bool>, string)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #soundPlayer |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'MainFormController.soundPlayer' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #speakerForTheDead |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'MainFormController.speakerForTheDead' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #UnbindToQueueTreeView(ThoughtWorks.CruiseControl.CCTrayLib.Presentation.QueueTreeView) |
Breaking |
50 %
|
Consider passing base types as parameters |
|
| Rule: |
Consider passing base types as parameters |
| Check Id: |
CA1011 |
| Category: |
Microsoft.Design |
| Description: |
Using base types as parameters to methods improves re-use of these methods if you only use methods & properties from the parameter's base class. E.g. use Stream instead of FileStream as a parameter when only calling Stream.Read(), this makes the method work on all kind of streams instead of just File streams. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\MainFormController.cs at line 273 |
| Resolution: |
Consider changing the type of parameter 'treeView' in 'MainFormController.UnbindToQueueTreeView(QueueTreeView)' from 'QueueTreeView' to its base type 'TreeView'. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature. |
| Help Link: |
http://msdn2.microsoft.com/library/3hk32yyz(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
MainFormController - #x10Controller |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'MainFormController.x10Controller' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Presentation - NativeMethods |
Breaking |
33 %
|
Review SuppressUnmanagedCodeSecurityAttribute usage |
|
| Rule: |
Review SuppressUnmanagedCodeSecurityAttribute usage |
| Check Id: |
CA2118 |
| Category: |
Microsoft.Security |
| Description: |
Calling a method with the SuppressUnmanagedCodeSecurityAttribute applied to it can create a security weakness. Unmanaged code security checks ensure that all callers in the call stack have permission to execute unmanaged code. Disabling code security for P/Invoke methods allows callers that do not have this permission to breach security. This is acceptable only if the code is completely harmless, or callers have no way to pass arbitrary arguments through to the unmanaged code. |
| Found at: |
|
| Resolution: |
Remove SuppressUnmanagedCodeSecurityAttribute from 'NativeMethods' or ensure its use does not result in a security vulnerability. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182311(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Presentation - NativeMethods |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'NativeMethods'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
NativeMethods - #SetForegroundWindow(System.IntPtr) |
Breaking |
50 %
|
P/Invokes should not be visible |
|
| Rule: |
P/Invokes should not be visible |
| Check Id: |
CA1401 |
| Category: |
Microsoft.Interoperability |
| Description: |
Interop layer should not be public. The DllImport attribute should not be applied to publicly accessible members (public or protected). |
| Found at: |
|
| Resolution: |
Change the accessibility of P/Invoke 'NativeMethods.SetForegroundWindow(IntPtr)' so that it is no longer visible from outside its assembly. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182209(VS.90).aspx |
| Rule File: |
InteroperabilityRules.dll Version: 9.0.0.0 |
|
 |
 |
NativeMethods - #SetForegroundWindow(System.IntPtr) |
Breaking |
33 %
|
Review SuppressUnmanagedCodeSecurityAttribute usage |
|
| Rule: |
Review SuppressUnmanagedCodeSecurityAttribute usage |
| Check Id: |
CA2118 |
| Category: |
Microsoft.Security |
| Description: |
Calling a method with the SuppressUnmanagedCodeSecurityAttribute applied to it can create a security weakness. Unmanaged code security checks ensure that all callers in the call stack have permission to execute unmanaged code. Disabling code security for P/Invoke methods allows callers that do not have this permission to breach security. This is acceptable only if the code is completely harmless, or callers have no way to pass arbitrary arguments through to the unmanaged code. |
| Found at: |
|
| Resolution: |
Review declarative security for 'NativeMethods.SetForegroundWindow(IntPtr)' and its callers for potential vulnerabilities. This method is accessible from outside its assembly, and might therefore provide a way to circumvent security protection. Consider removing SuppressUnmanagedCodeSecurity from the method or make it private and wrap it with a public method that demands a permission appropriate to the P/Invoke functionality and security risk. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182311(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #downloader_ProgressChanged(System.Object,System.ComponentModel.ProgressChangedEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 221 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'PackagesListForm.downloader_ProgressChanged(object, ProgressChangedEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #downloader_RunWorkerCompleted(System.Object,System.ComponentModel.RunWorkerCompletedEventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 208 |
| Resolution: |
Change 'PackagesListForm.downloader_RunWorkerCompleted(object, RunWorkerCompletedEventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #DownloadPackages() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 174 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'PackagesListForm.DownloadPackages()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #DownloadPackages() |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 158 |
| Resolution: |
Change 'PackagesListForm.DownloadPackages()' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #FormatSize(System.Int64) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 122 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'PackagesListForm.FormatSize(long)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #FormatSize(System.Int64) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 126 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'PackagesListForm.FormatSize(long)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #listLoader_DoWork(System.Object,System.ComponentModel.DoWorkEventArgs) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 84 |
| Resolution: |
Modify 'PackagesListForm.listLoader_DoWork(object, DoWorkEventArgs)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #listLoader_RunWorkerCompleted(System.Object,System.ComponentModel.RunWorkerCompletedEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 101 |
| Resolution: |
Because the behavior of 'DateTime.ToString(string)' could vary based on the current user's locale settings, replace this call in 'PackagesListForm.listLoader_RunWorkerCompleted(object, RunWorkerCompletedEventArgs)' with a call to 'DateTime.ToString(string, IFormatProvider)'. If the result of 'DateTime.ToString(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #listLoader_RunWorkerCompleted(System.Object,System.ComponentModel.RunWorkerCompletedEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 101 |
| Resolution: |
Because the behavior of 'int.ToString()' could vary based on the current user's locale settings, replace this call in 'PackagesListForm.listLoader_RunWorkerCompleted(object, RunWorkerCompletedEventArgs)' with a call to 'int.ToString(IFormatProvider)'. If the result of 'int.ToString(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #listLoader_RunWorkerCompleted(System.Object,System.ComponentModel.RunWorkerCompletedEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 93 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'PackagesListForm.listLoader_RunWorkerCompleted(object, RunWorkerCompletedEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
PackagesListForm - #listLoader_RunWorkerCompleted(System.Object,System.ComponentModel.RunWorkerCompletedEventArgs) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 115 |
| Resolution: |
Change 'PackagesListForm.listLoader_RunWorkerCompleted(object, RunWorkerCompletedEventArgs)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
#Project - #set_Project(ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.IProjectMonitor) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\PackagesListForm.cs at line 53 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'PackagesListForm.Project.set(IProjectMonitor)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
QueueTreeView - #.ctor() |
NonBreaking |
90 %
|
Do not initialize unnecessarily |
|
| Rule: |
Do not initialize unnecessarily |
| Check Id: |
CA1805 |
| Category: |
Microsoft.Performance |
| Description: |
Do not make initializations that have already been done by the runtime. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\QueueTreeView.cs at line 17 |
| Resolution: |
'QueueTreeView.QueueTreeView()' initializes field 'QueueTreeView.inRestoreExpandedNodesMode' of type 'bool' to false. Remove this initialization because it will be done automatically by the runtime. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182274(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
QueueTreeView - #GetQueueId(System.Windows.Forms.TreeNode,ThoughtWorks.CruiseControl.CCTrayLib.Presentation.IntegrationQueueTreeNodeTag) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\QueueTreeView.cs at line 62 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'QueueTreeView.GetQueueId(TreeNode, IntegrationQueueTreeNodeTag)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
QueueTreeView - #GetQueueId(System.Windows.Forms.TreeNode,ThoughtWorks.CruiseControl.CCTrayLib.Presentation.IntegrationQueueTreeNodeTag) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\QueueTreeView.cs at line 62 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'QueueTreeView.GetQueueId(TreeNode, IntegrationQueueTreeNodeTag)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #.cctor() |
NonBreaking |
90 %
|
Initialize reference type static fields inline |
|
| Rule: |
Initialize reference type static fields inline |
| Check Id: |
CA1810 |
| Category: |
Microsoft.Performance |
| Description: |
Static fields should be initialized when declared. Initializing static data in explicit static constructors results in less performant code. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ResourceIntegrationQueueIconProvider.cs at line 8 |
| Resolution: |
Initialize all static fields in 'ResourceIntegrationQueueIconProvider' when those fields are declared and remove the explicit static constructor. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182275(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #BUILDING |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceIntegrationQueueIconProvider.BUILDING' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #BUILDING |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'BUILDING' in member name 'ResourceIntegrationQueueIconProvider.BUILDING' by changing it to 'Building'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #CHECKING_MODIFICATIONS |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceIntegrationQueueIconProvider.CHECKING_MODIFICATIONS' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #CHECKING_MODIFICATIONS |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'CHECKING' in member name 'ResourceIntegrationQueueIconProvider.CHECKING_MODIFICATIONS' by changing it to 'Checking'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #CHECKING_MODIFICATIONS |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'MODIFICATIONS' in member name 'ResourceIntegrationQueueIconProvider.CHECKING_MODIFICATIONS' by changing it to 'Modifications'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #CHECKING_MODIFICATIONS |
Breaking |
95 %
|
Identifiers should not contain underscores |
|
| Rule: |
Identifiers should not contain underscores |
| Check Id: |
CA1707 |
| Category: |
Microsoft.Naming |
| Description: |
Do not use underscores when specifying identifiers. Some generated Visual Studio identifiers for applications contain underscore characters. Underscore characters should generally be avoided in public identifiers. |
| Found at: |
|
| Resolution: |
Remove the underscores from member name 'ResourceIntegrationQueueIconProvider.CHECKING_MODIFICATIONS'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182245(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #HTTP_SERVER |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceIntegrationQueueIconProvider.HTTP_SERVER' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #HTTP_SERVER |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'HTTP' in member name 'ResourceIntegrationQueueIconProvider.HTTP_SERVER' by changing it to 'Http'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #HTTP_SERVER |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'SERVER' in member name 'ResourceIntegrationQueueIconProvider.HTTP_SERVER' by changing it to 'Server'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #HTTP_SERVER |
Breaking |
95 %
|
Identifiers should not contain underscores |
|
| Rule: |
Identifiers should not contain underscores |
| Check Id: |
CA1707 |
| Category: |
Microsoft.Naming |
| Description: |
Do not use underscores when specifying identifiers. Some generated Visual Studio identifiers for applications contain underscore characters. Underscore characters should generally be avoided in public identifiers. |
| Found at: |
|
| Resolution: |
Remove the underscores from member name 'ResourceIntegrationQueueIconProvider.HTTP_SERVER'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182245(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #PENDING |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceIntegrationQueueIconProvider.PENDING' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #PENDING |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'PENDING' in member name 'ResourceIntegrationQueueIconProvider.PENDING' by changing it to 'Pending'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_EMPTY |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceIntegrationQueueIconProvider.QUEUE_EMPTY' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_EMPTY |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'EMPTY' in member name 'ResourceIntegrationQueueIconProvider.QUEUE_EMPTY' by changing it to 'Empty'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_EMPTY |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'QUEUE' in member name 'ResourceIntegrationQueueIconProvider.QUEUE_EMPTY' by changing it to 'Queue'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_EMPTY |
Breaking |
95 %
|
Identifiers should not contain underscores |
|
| Rule: |
Identifiers should not contain underscores |
| Check Id: |
CA1707 |
| Category: |
Microsoft.Naming |
| Description: |
Do not use underscores when specifying identifiers. Some generated Visual Studio identifiers for applications contain underscore characters. Underscore characters should generally be avoided in public identifiers. |
| Found at: |
|
| Resolution: |
Remove the underscores from member name 'ResourceIntegrationQueueIconProvider.QUEUE_EMPTY'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182245(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_POPULATED |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceIntegrationQueueIconProvider.QUEUE_POPULATED' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_POPULATED |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'POPULATED' in member name 'ResourceIntegrationQueueIconProvider.QUEUE_POPULATED' by changing it to 'Populated'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_POPULATED |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'QUEUE' in member name 'ResourceIntegrationQueueIconProvider.QUEUE_POPULATED' by changing it to 'Queue'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #QUEUE_POPULATED |
Breaking |
95 %
|
Identifiers should not contain underscores |
|
| Rule: |
Identifiers should not contain underscores |
| Check Id: |
CA1707 |
| Category: |
Microsoft.Naming |
| Description: |
Do not use underscores when specifying identifiers. Some generated Visual Studio identifiers for applications contain underscore characters. Underscore characters should generally be avoided in public identifiers. |
| Found at: |
|
| Resolution: |
Remove the underscores from member name 'ResourceIntegrationQueueIconProvider.QUEUE_POPULATED'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182245(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #REMOTING_SERVER |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceIntegrationQueueIconProvider.REMOTING_SERVER' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #REMOTING_SERVER |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'REMOTING' in member name 'ResourceIntegrationQueueIconProvider.REMOTING_SERVER' by changing it to 'Remoting'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #REMOTING_SERVER |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'SERVER' in member name 'ResourceIntegrationQueueIconProvider.REMOTING_SERVER' by changing it to 'Server'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceIntegrationQueueIconProvider - #REMOTING_SERVER |
Breaking |
95 %
|
Identifiers should not contain underscores |
|
| Rule: |
Identifiers should not contain underscores |
| Check Id: |
CA1707 |
| Category: |
Microsoft.Naming |
| Description: |
Do not use underscores when specifying identifiers. Some generated Visual Studio identifiers for applications contain underscore characters. Underscore characters should generally be avoided in public identifiers. |
| Found at: |
|
| Resolution: |
Remove the underscores from member name 'ResourceIntegrationQueueIconProvider.REMOTING_SERVER'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182245(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Presentation - ResourceProjectStateIconProvider |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
|
| Resolution: |
Provide an overridable implementation of Dispose(bool) on 'ResourceProjectStateIconProvider' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #.cctor() |
NonBreaking |
90 %
|
Initialize reference type static fields inline |
|
| Rule: |
Initialize reference type static fields inline |
| Check Id: |
CA1810 |
| Category: |
Microsoft.Performance |
| Description: |
Static fields should be initialized when declared. Initializing static data in explicit static constructors results in less performant code. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ResourceProjectStateIconProvider.cs at line 8 |
| Resolution: |
Initialize all static fields in 'ResourceProjectStateIconProvider' when those fields are declared and remove the explicit static constructor. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182275(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #Dispose() |
NonBreaking |
75 %
|
Call GC.SuppressFinalize correctly |
|
| Rule: |
Call GC.SuppressFinalize correctly |
| Check Id: |
CA1816 |
| Category: |
Microsoft.Usage |
| Description: |
Call GC.SuppressFinalize to suppress finalization of your instance once Dispose has been called. Objects that implement IDisposable should call SuppressFinalize from the IDisposable.Dispose method to prevent the garbage collector from calling Object.Finalize on an object that does not require it. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ResourceProjectStateIconProvider.cs at line 16 |
| Resolution: |
Change 'ResourceProjectStateIconProvider.Dispose()' to call 'GC.SuppressFinalize(object)'. This will prevent unnecessary finalization of the object once it has been disposed and it has fallen out of scope. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182269(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #Dispose() |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\ResourceProjectStateIconProvider.cs at line 16 |
| Resolution: |
Modify 'ResourceProjectStateIconProvider.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #GRAY |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceProjectStateIconProvider.GRAY' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #GRAY |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'GRAY' in member name 'ResourceProjectStateIconProvider.GRAY' by changing it to 'Gray'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #GREEN |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceProjectStateIconProvider.GREEN' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #GREEN |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'GREEN' in member name 'ResourceProjectStateIconProvider.GREEN' by changing it to 'Green'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #ORANGE |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceProjectStateIconProvider.ORANGE' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #ORANGE |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'ORANGE' in member name 'ResourceProjectStateIconProvider.ORANGE' by changing it to 'Orange'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #RED |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceProjectStateIconProvider.RED' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #RED |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'RED' in member name 'ResourceProjectStateIconProvider.RED' by changing it to 'Red'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #YELLOW |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'ResourceProjectStateIconProvider.YELLOW' or change the field to one that is an immutable reference type. If the reference type 'StatusIcon' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
ResourceProjectStateIconProvider - #YELLOW |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'YELLOW' in member name 'ResourceProjectStateIconProvider.YELLOW' by changing it to 'Yellow'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
SelectAudioFileController - #FindAudioFile(System.Windows.Forms.TextBox) |
NonBreaking |
95 %
|
Specify StringComparison |
|
| Rule: |
Specify StringComparison |
| Check Id: |
CA1307 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a StringComparison argument, it should always be called in favor of an overload that does not. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\SelectAudioFileController.cs at line 52 |
| Resolution: |
'SelectAudioFileController.FindAudioFile(TextBox)' makes a call to 'string.StartsWith(string)' that does not explicitly provide a StringComparison. This should be replaced with a call to 'string.StartsWith(string, StringComparison)'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386080(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
SelectAudioFileController - #PlayAudioFile(System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\SelectAudioFileController.cs at line 65 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'SelectAudioFileController.PlayAudioFile(string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
SelectAudioFileController - #PlayAudioFile(System.String) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\SelectAudioFileController.cs at line 70 |
| Resolution: |
Change 'SelectAudioFileController.PlayAudioFile(string)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
SelectIconController - #FindIconFile(System.Windows.Forms.TextBox) |
NonBreaking |
95 %
|
Specify StringComparison |
|
| Rule: |
Specify StringComparison |
| Check Id: |
CA1307 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a StringComparison argument, it should always be called in favor of an overload that does not. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\SelectIconController.cs at line 47 |
| Resolution: |
'SelectIconController.FindIconFile(TextBox)' makes a call to 'string.StartsWith(string)' that does not explicitly provide a StringComparison. This should be replaced with a call to 'string.StartsWith(string, StringComparison)'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386080(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechSettingsControl - #currentConfiguration |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'SpeechSettingsControl.currentConfiguration' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
#Description - #set_Description(System.String) |
DependsOnFix |
95 %
|
Review unused parameters |
|
| Rule: |
Review unused parameters |
| Check Id: |
CA1801 |
| Category: |
Microsoft.Usage |
| Description: |
Review parameters in non-virtual methods that are not used in the method body to ensure no correctness exists around failure to access them. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 29 |
| Resolution: |
Parameter 'value' of 'StatusItemDisplay.Description.set(string)' is never used. Remove the parameter or use it in the method body. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182268(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
#ErrorMessage - #set_ErrorMessage(System.String) |
DependsOnFix |
95 %
|
Review unused parameters |
|
| Rule: |
Review unused parameters |
| Check Id: |
CA1801 |
| Category: |
Microsoft.Usage |
| Description: |
Review parameters in non-virtual methods that are not used in the method body to ensure no correctness exists around failure to access them. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 71 |
| Resolution: |
Parameter 'value' of 'StatusItemDisplay.ErrorMessage.set(string)' is never used. Remove the parameter or use it in the method body. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182268(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
#Name - #set_Name(System.String) |
DependsOnFix |
95 %
|
Review unused parameters |
|
| Rule: |
Review unused parameters |
| Check Id: |
CA1801 |
| Category: |
Microsoft.Usage |
| Description: |
Review parameters in non-virtual methods that are not used in the method body to ensure no correctness exists around failure to access them. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 22 |
| Resolution: |
Parameter 'value' of 'StatusItemDisplay.Name.set(string)' is never used. Remove the parameter or use it in the method body. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182268(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
#Status - #set_Status(System.String) |
DependsOnFix |
95 %
|
Review unused parameters |
|
| Rule: |
Review unused parameters |
| Check Id: |
CA1801 |
| Category: |
Microsoft.Usage |
| Description: |
Review parameters in non-virtual methods that are not used in the method body to ensure no correctness exists around failure to access them. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 47 |
| Resolution: |
Parameter 'value' of 'StatusItemDisplay.Status.set(string)' is never used. Remove the parameter or use it in the method body. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182268(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
#TimeCompleted - #get_TimeCompleted() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 62 |
| Resolution: |
Because the behavior of 'DateTime.ToString(string)' could vary based on the current user's locale settings, replace this call in 'StatusItemDisplay.TimeCompleted.get()' with a call to 'DateTime.ToString(string, IFormatProvider)'. If the result of 'DateTime.ToString(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
#TimeCompleted - #set_TimeCompleted(System.String) |
DependsOnFix |
95 %
|
Review unused parameters |
|
| Rule: |
Review unused parameters |
| Check Id: |
CA1801 |
| Category: |
Microsoft.Usage |
| Description: |
Review parameters in non-virtual methods that are not used in the method body to ensure no correctness exists around failure to access them. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 63 |
| Resolution: |
Parameter 'value' of 'StatusItemDisplay.TimeCompleted.set(string)' is never used. Remove the parameter or use it in the method body. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182268(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
#TimeStarted - #get_TimeStarted() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 54 |
| Resolution: |
Because the behavior of 'DateTime.ToString(string)' could vary based on the current user's locale settings, replace this call in 'StatusItemDisplay.TimeStarted.get()' with a call to 'DateTime.ToString(string, IFormatProvider)'. If the result of 'DateTime.ToString(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
#TimeStarted - #set_TimeStarted(System.String) |
DependsOnFix |
95 %
|
Review unused parameters |
|
| Rule: |
Review unused parameters |
| Check Id: |
CA1801 |
| Category: |
Microsoft.Usage |
| Description: |
Review parameters in non-virtual methods that are not used in the method body to ensure no correctness exists around failure to access them. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StatusItemDisplay.cs at line 55 |
| Resolution: |
Parameter 'value' of 'StatusItemDisplay.TimeStarted.set(string)' is never used. Remove the parameter or use it in the method body. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182268(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
StubProjectMonitor - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StubProjectMonitor.cs at line 248 |
| Resolution: |
Change 'List<ParameterBase>' in 'StubProjectMonitor.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
#SummaryStatusString - #get_SummaryStatusString() |
Breaking |
90 %
|
Do not raise exceptions in unexpected locations |
|
| Rule: |
Do not raise exceptions in unexpected locations |
| Check Id: |
CA1065 |
| Category: |
Microsoft.Design |
| Description: |
Do not explicitly raise exceptions from unexpected locations. There are some methods, such as Equals and GetHashCode, which users do not expect to raise exceptions. Therefore calls to these methods are not commonly wrapped in try catch blocks. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\StubProjectMonitor.cs at line 209 |
| Resolution: |
'StubProjectMonitor.SummaryStatusString.get()' creates an exception of type 'NotImplementedException', an exception type that should not be raised in a property. If this exception instance might be raised, use a different exception type, convert this property into a method, or change this property's logic so that it no longer raises an exception. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386039(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
SynchronizedProjectMonitor - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\SynchronizedProjectMonitor.cs at line 183 |
| Resolution: |
Change 'List<ParameterBase>' in 'SynchronizedProjectMonitor.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
TrayIconFacade - #BalloonMessageProvider |
DependsOnFix |
95 %
|
Properties should not be write only |
|
| Rule: |
Properties should not be write only |
| Check Id: |
CA1044 |
| Category: |
Microsoft.Design |
| Description: |
Write-only properties usually indicate a flawed design. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\TrayIconFacade.cs at line 39 |
| Resolution: |
Because property 'TrayIconFacade.BalloonMessageProvider' is write-only, either add a property getter with an accessibility that is greater than or equal to its setter or convert this property into a method. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182165(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
TrayIconFacade - #IconProvider |
DependsOnFix |
95 %
|
Properties should not be write only |
|
| Rule: |
Properties should not be write only |
| Check Id: |
CA1044 |
| Category: |
Microsoft.Design |
| Description: |
Write-only properties usually indicate a flawed design. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\TrayIconFacade.cs at line 31 |
| Resolution: |
Because property 'TrayIconFacade.IconProvider' is write-only, either add a property getter with an accessibility that is greater than or equal to its setter or convert this property into a method. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182165(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
TrayIconFacade - #Monitor_BuildOccurred(System.Object,ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.MonitorBuildOccurredEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\TrayIconFacade.cs at line 73 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'TrayIconFacade.Monitor_BuildOccurred(object, MonitorBuildOccurredEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
WindowStateEventArgs - #Key |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'WindowStateEventArgs.Key' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
X10SettingsControl - #timeWithGoodDate(System.DateTime) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Presentation\X10SettingsControl.cs at line 119 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'X10SettingsControl.timeWithGoodDate(DateTime)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Security - UserNameAuthentication |
DependsOnFix |
95 %
|
Types that own disposable fields should be disposable |
|
| Rule: |
Types that own disposable fields should be disposable |
| Check Id: |
CA1001 |
| Category: |
Microsoft.Design |
| Description: |
Types that declare disposable members should also implement IDisposable. If the type does not own any unmanaged resources, do not implement a finalizer on it. |
| Found at: |
|
| Resolution: |
Implement IDisposable on 'UserNameAuthentication' because it creates members of the following IDisposable types: 'ConfigureUserName'. If 'UserNameAuthentication' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182172(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Security - UserPasswordAuthentication |
DependsOnFix |
95 %
|
Types that own disposable fields should be disposable |
|
| Rule: |
Types that own disposable fields should be disposable |
| Check Id: |
CA1001 |
| Category: |
Microsoft.Design |
| Description: |
Types that declare disposable members should also implement IDisposable. If the type does not own any unmanaged resources, do not implement a finalizer on it. |
| Found at: |
|
| Resolution: |
Implement IDisposable on 'UserPasswordAuthentication' because it creates members of the following IDisposable types: 'ConfigureUserPassword'. If 'UserPasswordAuthentication' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182172(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Security - WinLoginAuthentication |
Breaking |
95 %
|
Use preferred terms |
|
| Rule: |
Use preferred terms |
| Check Id: |
CA1726 |
| Category: |
Microsoft.Naming |
| Description: |
Use preferred terms over deprecated alternates. |
| Found at: |
|
| Resolution: |
Replace the term 'Login' in type name 'WinLoginAuthentication' with the preferred alternate 'LogOn'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182258(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
WinLoginAuthentication - #Configure(System.Windows.Forms.IWin32Window) |
NonBreaking |
95 %
|
Specify MessageBoxOptions |
|
| Rule: |
Specify MessageBoxOptions |
| Check Id: |
CA1300 |
| Category: |
Microsoft.Globalization |
| Description: |
In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Security\WinLoginAuthentication.cs at line 26 |
| Resolution: |
Change 'WinLoginAuthentication.Configure(IWin32Window)' to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182191(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeakingProjectMonitor - #monitor |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'SpeakingProjectMonitor.monitor' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeakingProjectMonitor - #Monitor_BuildOccurred(System.Object,ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.MonitorBuildOccurredEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Speech\SpeakingProjectMonitor.cs at line 52 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'SpeakingProjectMonitor.Monitor_BuildOccurred(object, MonitorBuildOccurredEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeakingProjectMonitor - #Monitor_Polled(System.Object,ThoughtWorks.CruiseControl.CCTrayLib.Monitoring.MonitorPolledEventArgs) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Speech\SpeakingProjectMonitor.cs at line 73 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'SpeakingProjectMonitor.Monitor_Polled(object, MonitorPolledEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.Speech - SpeechUtil |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'SpeechUtil'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechUtil - #makeProjectNameMoreSpeechFriendly(System.String) |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Speech\SpeechUtil.cs at line 21 |
| Resolution: |
Correct the casing of 'make' in member name 'SpeechUtil.makeProjectNameMoreSpeechFriendly(string)' by changing it to 'Make'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechUtil - #shouldSpeak(ThoughtWorks.CruiseControl.CCTrayLib.BuildTransition,System.Boolean,System.Boolean) |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Speech\SpeechUtil.cs at line 44 |
| Resolution: |
Correct the casing of 'should' in member name 'SpeechUtil.shouldSpeak(BuildTransition, bool, bool)' by changing it to 'Should'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
SpeechUtil - #shouldSpeak(ThoughtWorks.CruiseControl.CCTrayLib.BuildTransition,System.Boolean,System.Boolean) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\Speech\SpeechUtil.cs at line 44 |
| Resolution: |
In method 'SpeechUtil.shouldSpeak(BuildTransition, bool, bool)', consider providing a more meaningful name than parameter name 't'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.X10 - Cm11LowLevelDriver |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'Cm' in type name 'Cm11LowLevelDriver' by changing it to 'CM'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver - #.ctor(System.String,System.String,System.Int32,System.IO.Ports.Parity,System.Int32,System.IO.Ports.StopBits) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriver.cs at line 93 |
| Resolution: |
'Cm11LowLevelDriver.Cm11LowLevelDriver(string, string, int, Parity, int, StopBits)' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver - #ControlDevice(System.Int32,ThoughtWorks.CruiseControl.CCTrayLib.X10.Function,System.Int32) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriver.cs at line 192 |
| Resolution: |
'Cm11LowLevelDriver.ControlDevice(int, Function, int)' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver - #Controller |
DependsOnFix |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriver.cs at line 281 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'Cm11LowLevelDriver.Controller' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver - #GetCM11aDeviceCode(System.Int32) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriver.cs at line 169 |
| Resolution: |
'Cm11LowLevelDriver.GetCM11aDeviceCode(int)' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver - #GetCM11aDeviceCode(System.Int32) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriver.cs at line 134 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'Cm11LowLevelDriver.GetCM11aDeviceCode(int)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.X10 - Cm11LowLevelDriver+Cm11LowLevelDriverWorker |
NonBreaking |
95 %
|
Types that own disposable fields should be disposable |
|
| Rule: |
Types that own disposable fields should be disposable |
| Check Id: |
CA1001 |
| Category: |
Microsoft.Design |
| Description: |
Types that declare disposable members should also implement IDisposable. If the type does not own any unmanaged resources, do not implement a finalizer on it. |
| Found at: |
|
| Resolution: |
Implement IDisposable on 'Cm11LowLevelDriver.Cm11LowLevelDriverWorker' because it creates members of the following IDisposable types: 'SerialPort'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182172(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver+Cm11LowLevelDriverWorker - #Checksum(System.Byte[],System.Int32) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriverWorker.cs at line 372 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'Cm11LowLevelDriver.Cm11LowLevelDriverWorker.Checksum(byte[], int)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver+Cm11LowLevelDriverWorker - #ComPortCreated() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriverWorker.cs at line 191 |
| Resolution: |
Modify 'Cm11LowLevelDriver.Cm11LowLevelDriverWorker.ComPortCreated()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm11LowLevelDriver+Cm11LowLevelDriverWorker - #comRetryInterval |
NonBreaking |
95 %
|
Use literals where appropriate |
|
| Rule: |
Use literals where appropriate |
| Check Id: |
CA1802 |
| Category: |
Microsoft.Performance |
| Description: |
Prefer literals over InitOnly fields if values do not have to be calculated at runtime. |
| Found at: |
|
| Resolution: |
Field 'Cm11LowLevelDriver.Cm11LowLevelDriverWorker.comRetryInterval' is declared as 'static readonly' but is initialized with a constant value '5000'. Mark this field as 'const' instead. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182280(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
#TransmissionRetries - #set_TransmissionRetries(System.Int32) |
NonBreaking |
75 %
|
Avoid uncalled private code |
|
| Rule: |
Avoid uncalled private code |
| Check Id: |
CA1811 |
| Category: |
Microsoft.Performance |
| Description: |
There is uncalled code that is not externally visible and is not a known runtime entry point. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm11LowLevelDriverWorker.cs at line 131 |
| Resolution: |
'Cm11LowLevelDriver.Cm11LowLevelDriverWorker.TransmissionRetries.set(int)' appears to have no upstream public or protected callers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182264(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.X10 - Cm11LowLevelDriverError |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'Cm' in type name 'Cm11LowLevelDriverError' by changing it to 'CM'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.X10 - Cm17LowLevelDriver |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'Cm' in type name 'Cm17LowLevelDriver' by changing it to 'CM'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm17LowLevelDriver - #ControlDevice(System.Int32,ThoughtWorks.CruiseControl.CCTrayLib.X10.Function,System.Int32) |
NonBreaking |
33 %
|
Do not indirectly expose methods with link demands |
|
| Rule: |
Do not indirectly expose methods with link demands |
| Check Id: |
CA2122 |
| Category: |
Microsoft.Security |
| Description: |
Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm17LowLevelDriver.cs at line 30 |
| Resolution: |
'Cm17LowLevelDriver.ControlDevice(int, Function, int)' calls into 'Process.StandardOutput.get()' which has a LinkDemand. By making this call, 'Process.StandardOutput.get()' is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection:
->'Cm17LowLevelDriver.ControlDevice(int, Function, int)'
->'Cm17LowLevelDriver.ControlDevice(int, Function, int)' |
| Help Link: |
http://msdn2.microsoft.com/library/ms182303(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm17LowLevelDriver - #getPortNum() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm17LowLevelDriver.cs at line 59 |
| Resolution: |
Because the behavior of 'int.Parse(string)' could vary based on the current user's locale settings, replace this call in 'Cm17LowLevelDriver.getPortNum()' with a call to 'int.Parse(string, IFormatProvider)'. If the result of 'int.Parse(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Cm17LowLevelDriver - #ResetStatus(System.Windows.Forms.Label) |
Breaking |
95 %
|
Parameter names should match base declaration |
|
| Rule: |
Parameter names should match base declaration |
| Check Id: |
CA1725 |
| Category: |
Microsoft.Naming |
| Description: |
For usability reasons, parameter names in overridden methods should match those of the base declaration. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\Cm17LowLevelDriver.cs at line 24 |
| Resolution: |
In member 'Cm17LowLevelDriver.ResetStatus(Label)', change parameter name 'labelSimulationStatus' to 'statusLabel' in order to match the identifier as it has been declared in 'IX10LowLevelDriver.ResetStatus(Label)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182251(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.X10 - Function |
Breaking |
95 %
|
Enums should have zero value |
|
| Rule: |
Enums should have zero value |
| Check Id: |
CA1008 |
| Category: |
Microsoft.Design |
| Description: |
An enum should generally have a zero value. If the enum is not decorated with the Flags attribute, it should have a member with a value of zero that represents the empty state. Optionally, this value is named 'None'. For a Flags-attributed enum, a zero-valued member is optional and, if it exists, should always be named 'None'. This value should indicate that no values have been set in the enum. Using a zero-valued member for other purposes is contrary to the use of the Flags attribute in that the bitwise AND and OR operators are useless with the member. |
| Found at: |
|
| Resolution: |
In enum 'Function', change the name of 'Function.AllUnitsOff' to 'None'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182149(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.X10 - Function |
Breaking |
95 %
|
Identifiers should not match keywords |
|
| Rule: |
Identifiers should not match keywords |
| Check Id: |
CA1716 |
| Category: |
Microsoft.Naming |
| Description: |
Identifiers which conflict with reserved language keywords should be avoided. Using a reserved keyword as an identifier makes it harder for consumers in other languages to use your API. |
| Found at: |
|
| Resolution: |
Rename type 'Function' so that it no longer conflicts with the reserved language keyword 'Function'. Using a reserved keyword as the name of a type makes it harder for consumers in other languages to use the type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182248(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.CCTrayLib.X10 - HouseCode |
NonBreaking |
95 %
|
Enums should have zero value |
|
| Rule: |
Enums should have zero value |
| Check Id: |
CA1008 |
| Category: |
Microsoft.Design |
| Description: |
An enum should generally have a zero value. If the enum is not decorated with the Flags attribute, it should have a member with a value of zero that represents the empty state. Optionally, this value is named 'None'. For a Flags-attributed enum, a zero-valued member is optional and, if it exists, should always be named 'None'. This value should indicate that no values have been set in the enum. Using a zero-valued member for other purposes is contrary to the use of the Flags attribute in that the bitwise AND and OR operators are useless with the member. |
| Found at: |
|
| Resolution: |
Add a member to 'HouseCode' that has a value of zero with a suggested name of 'None'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182149(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #A |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.A'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #B |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.B'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #C |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.C'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #D |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.D'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #E |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.E'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #F |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.F'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #G |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.G'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #H |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.H'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #I |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.I'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #J |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.J'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #K |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.K'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #L |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.L'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #M |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.M'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #N |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.N'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #O |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.O'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
HouseCode - #P |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
|
| Resolution: |
Consider providing a more meaningful name than member name 'HouseCode.P'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ILampController - #GreenLightOn |
DependsOnFix |
95 %
|
Properties should not be write only |
|
| Rule: |
Properties should not be write only |
| Check Id: |
CA1044 |
| Category: |
Microsoft.Design |
| Description: |
Write-only properties usually indicate a flawed design. |
| Found at: |
|
| Resolution: |
Because property 'ILampController.GreenLightOn' is write-only, either add a property getter with an accessibility that is greater than or equal to its setter or convert this property into a method. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182165(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ILampController - #RedLightOn |
DependsOnFix |
95 %
|
Properties should not be write only |
|
| Rule: |
Properties should not be write only |
| Check Id: |
CA1044 |
| Category: |
Microsoft.Design |
| Description: |
Write-only properties usually indicate a flawed design. |
| Found at: |
|
| Resolution: |
Because property 'ILampController.RedLightOn' is write-only, either add a property getter with an accessibility that is greater than or equal to its setter or convert this property into a method. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182165(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ILampController - #YellowLightOn |
DependsOnFix |
95 %
|
Properties should not be write only |
|
| Rule: |
Properties should not be write only |
| Check Id: |
CA1044 |
| Category: |
Microsoft.Design |
| Description: |
Write-only properties usually indicate a flawed design. |
| Found at: |
|
| Resolution: |
Because property 'ILampController.YellowLightOn' is write-only, either add a property getter with an accessibility that is greater than or equal to its setter or convert this property into a method. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182165(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
LampController+Lamp - #name |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'LampController.Lamp.name' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
LowLevelDriverFactory - #.cctor() |
NonBreaking |
90 %
|
Do not initialize unnecessarily |
|
| Rule: |
Do not initialize unnecessarily |
| Check Id: |
CA1805 |
| Category: |
Microsoft.Performance |
| Description: |
Do not make initializations that have already been done by the runtime. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\LowLevelDriverFactory.cs at line 12 |
| Resolution: |
'LowLevelDriverFactory.LowLevelDriverFactory()' initializes field 'LowLevelDriverFactory.driver' of type 'IX10LowLevelDriver' to null. Remove this initialization because it will be done automatically by the runtime. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182274(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
LowLevelDriverFactory - #getDriver() |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\LowLevelDriverFactory.cs at line 24 |
| Resolution: |
Correct the casing of 'get' in member name 'LowLevelDriverFactory.getDriver()' by changing it to 'Get'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LowLevelDriverFactory - #getDriver() |
Breaking |
75 %
|
Use properties where appropriate |
|
| Rule: |
Use properties where appropriate |
| Check Id: |
CA1024 |
| Category: |
Microsoft.Design |
| Description: |
Properties should be used instead of Get/Set methods in most situations. Methods are preferable to properties in the following situations: the operation is a conversion, is expensive or has an observable side-effect; the order of execution is important; calling the member twice in succession creates different results; a member is static but returns a mutable value; or the member returns an array. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\CCTrayLib\X10\LowLevelDriverFactory.cs at line 24 |
| Resolution: |
Change 'LowLevelDriverFactory.getDriver()' to a property if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182181(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
|
 |
 |
thoughtworks.cruisecontrol.core.dll |
371 |
455 |
1355 |
1810 |
|
 |
 |
$(ProjectDir)/../Build/Core/ThoughtWorks.CruiseControl.Core.dll - thoughtworks.cruisecontrol.core.dll |
NonBreaking |
95 %
|
Assemblies should have valid strong names |
|
| Rule: |
Assemblies should have valid strong names |
| Check Id: |
CA2210 |
| Category: |
Microsoft.Design |
| Description: |
Either the assembly has no strong name, an invalid one, or the strong name is valid only because of the computer configuration. The assembly should not be deployed in this state. The most common causes of this are: 1) The assembly's contents were modified after it was signed. 2) The signing process failed. 3) The assembly was delay-signed. 4) A registry key existed that allowed the check to pass (where it would not have otherwise). |
| Found at: |
|
| Resolution: |
Sign 'ThoughtWorks.CruiseControl.Core.dll' with a strong name key. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182127(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/Core/ThoughtWorks.CruiseControl.Core.dll - thoughtworks.cruisecontrol.core.dll |
NonBreaking |
95 %
|
Mark assemblies with CLSCompliantAttribute |
|
| Rule: |
Mark assemblies with CLSCompliantAttribute |
| Check Id: |
CA1014 |
| Category: |
Microsoft.Design |
| Description: |
Assemblies should explicitly state their CLS compliance using the CLSCompliant attribute. An assembly without this attribute is not CLS-compliant. Assemblies, modules, and types can be CLS-compliant even if some parts of the assembly, module, or type are not CLS-compliant. The following rules apply: 1) If the element is marked CLSCompliant, any noncompliant members must have the CLSCompliant attribute present with its argument set to false. 2) A comparable CLS-compliant alternative member must be supplied for each member that is not CLS-compliant. |
| Found at: |
|
| Resolution: |
Mark 'ThoughtWorks.CruiseControl.Core.dll' with CLSCompliant(true) because it exposes externally visible types. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182156(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/Core/ThoughtWorks.CruiseControl.Core.dll - thoughtworks.cruisecontrol.core.dll |
NonBreaking |
95 %
|
Mark assemblies with ComVisibleAttribute |
|
| Rule: |
Mark assemblies with ComVisibleAttribute |
| Check Id: |
CA1017 |
| Category: |
Microsoft.Design |
| Description: |
The System.Runtime.InteropServices.ComVisible attribute indicates whether COM clients can use the library. Good design dictates that developers explicitly indicate COM visibility. The default value for this attribute is 'true'. However, the best design is to mark the assembly ComVisible false, and then mark types, interfaces, and individual members as ComVisible true, as appropriate. |
| Found at: |
|
| Resolution: |
Because 'ThoughtWorks.CruiseControl.Core.dll' exposes externally visible types, mark it with ComVisible(false) at the assembly level and then mark all types within the assembly that should be exposed to COM clients with ComVisible(true). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182157(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
$(ProjectDir)/../Build/Core/ThoughtWorks.CruiseControl.Core.dll - thoughtworks.cruisecontrol.core.dll |
NonBreaking |
95 %
|
Mark assemblies with NeutralResourcesLanguageAttribute |
|
| Rule: |
Mark assemblies with NeutralResourcesLanguageAttribute |
| Check Id: |
CA1824 |
| Category: |
Microsoft.Performance |
| Description: |
The NeutralResourcesLanguage attribute informs the ResourceManager of the language used to render the neutral culture's resources for an assembly. When looking up resources in the same culture as the neutral resources language, the ResourceManager automatically uses the resources located in the main assembly, instead of searching for a satellite assembly with the current user interface culture for the current thread. This will improve lookup performance for the first resource you load and can reduce your working set. |
| Found at: |
|
| Resolution: |
Because assembly 'ThoughtWorks.CruiseControl.Core.dll' contains a ResX-based resource file, mark it with the NeutralResourcesLanguage attribute, specifying the language of the resources within the assembly. This could improve lookup performance the first time a resource is retrieved. |
| Help Link: |
http://msdn2.microsoft.com/library/bb385967(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - ConsoleEventHandler |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
|
| Resolution: |
Provide an overridable implementation of Dispose(bool) on 'ConsoleEventHandler' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleEventHandler - #SetConsoleCtrlHandler(ThoughtWorks.CruiseControl.Core.ConsoleEventHandler+ControlEventHandler,System.Boolean) |
Breaking |
95 %
|
Mark boolean P/Invoke arguments with MarshalAs |
|
| Rule: |
Mark boolean P/Invoke arguments with MarshalAs |
| Check Id: |
CA1414 |
| Category: |
Microsoft.Interoperability |
| Description: |
All boolean P/Invoke parameters and return types should be explicitly marked with the MarshalAs attribute. By default, the system will marshal all booleans as 4-byte UnmanagedType.Bool. This is the correct behavior for Win32 'BOOL' arguments but incorrect for C++ 'bool' arguments, which should be marshaled as 1-byte UnmanagedType.U1. For code maintainability reasons, always explicitly specify the marshaling information for boolean arguments and return values. |
| Found at: |
|
| Resolution: |
Add the MarshalAsAttribute to parameter 'add' of P/Invoke 'ConsoleEventHandler.SetConsoleCtrlHandler(ConsoleEventHandler.ControlEventHandler, bool)'. If the corresponding unmanaged parameter is a 4-byte Win32 'BOOL', use [MarshalAs(UnmanagedType.Bool)]. For a 1-byte C++ 'bool', use MarshalAs(UnmanagedType.U1). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182206(VS.90).aspx |
| Rule File: |
InteroperabilityRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleEventHandler - #SetConsoleCtrlHandler(ThoughtWorks.CruiseControl.Core.ConsoleEventHandler+ControlEventHandler,System.Boolean) |
Breaking |
95 %
|
Move P/Invokes to NativeMethods class |
|
| Rule: |
Move P/Invokes to NativeMethods class |
| Check Id: |
CA1060 |
| Category: |
Microsoft.Design |
| Description: |
This type contains members with the DllImport attribute. Members with the DllImport attribute should be contained in classes named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. |
| Found at: |
|
| Resolution: |
Because it is a P/Invoke method, 'ConsoleEventHandler.SetConsoleCtrlHandler(ConsoleEventHandler.ControlEventHandler, bool)' should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182161(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleEventHandler - #System.IDisposable.Dispose() |
NonBreaking |
75 %
|
Call GC.SuppressFinalize correctly |
|
| Rule: |
Call GC.SuppressFinalize correctly |
| Check Id: |
CA1816 |
| Category: |
Microsoft.Usage |
| Description: |
Call GC.SuppressFinalize to suppress finalization of your instance once Dispose has been called. Objects that implement IDisposable should call SuppressFinalize from the IDisposable.Dispose method to prevent the garbage collector from calling Object.Finalize on an object that does not require it. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\ConsoleEventHandler.cs at line 40 |
| Resolution: |
Change 'ConsoleEventHandler.IDisposable.Dispose()' to call 'GC.SuppressFinalize(object)'. This will prevent unnecessary finalization of the object once it has been disposed and it has fallen out of scope. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182269(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleEventHandler - #System.IDisposable.Dispose() |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\ConsoleEventHandler.cs at line 40 |
| Resolution: |
Modify 'ConsoleEventHandler.IDisposable.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleEventHandler - #System.IDisposable.Dispose() |
NonBreaking |
95 %
|
Interface methods should be callable by child types |
|
| Rule: |
Interface methods should be callable by child types |
| Check Id: |
CA1033 |
| Category: |
Microsoft.Design |
| Description: |
Explicit method implementations are defined with private accessibility. Classes that derive from classes with explicit method implementations and choose to re-declare them on the class will not be able to call into the base class implementation unless the base class has provided an alternate method with appropriate accessibility. When overriding a base class method that has been hidden by explicit interface implementation, in order to call into the base class implementation, a derived class must cast the base pointer to the relevant interface. When calling through this reference, however, the derived class implementation will actually be invoked, resulting in recursion and an eventual stack overflow. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\ConsoleEventHandler.cs at line 40 |
| Resolution: |
Make 'ConsoleEventHandler' sealed (a breaking change if this class has previously shipped), implement the method non-explicitly, or implement a new method that exposes the functionality of 'IDisposable.Dispose()' and is visible to derived classes. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182153(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleRunner - #GetRuntime() |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\ConsoleRunner.cs at line 67 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'ConsoleRunner.GetRuntime()' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleRunner - #ValidateResponse(ThoughtWorks.CruiseControl.Remote.Messages.Response) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\ConsoleRunner.cs at line 114 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'ConsoleRunner.ValidateResponse(Response)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleRunnerArguments - #DEFAULT_CONFIG_PATH |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'CONFIG' in member name 'ConsoleRunnerArguments.DEFAULT_CONFIG_PATH' by changing it to 'Config'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleRunnerArguments - #DEFAULT_CONFIG_PATH |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'DEFAULT' in member name 'ConsoleRunnerArguments.DEFAULT_CONFIG_PATH' by changing it to 'Default'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleRunnerArguments - #DEFAULT_CONFIG_PATH |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'PATH' in member name 'ConsoleRunnerArguments.DEFAULT_CONFIG_PATH' by changing it to 'Path'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ConsoleRunnerArguments - #DEFAULT_CONFIG_PATH |
Breaking |
95 %
|
Identifiers should not contain underscores |
|
| Rule: |
Identifiers should not contain underscores |
| Check Id: |
CA1707 |
| Category: |
Microsoft.Naming |
| Description: |
Do not use underscores when specifying identifiers. Some generated Visual Studio identifiers for applications contain underscore characters. Underscore characters should generally be avoided in public identifiers. |
| Found at: |
|
| Resolution: |
Remove the underscores from member name 'ConsoleRunnerArguments.DEFAULT_CONFIG_PATH'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182245(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - CruiseControlRemotingException |
NonBreaking |
95 %
|
Implement standard exception constructors |
|
| Rule: |
Implement standard exception constructors |
| Check Id: |
CA1032 |
| Category: |
Microsoft.Design |
| Description: |
Multiple constructors are required to correctly implement a custom exception. Missing constructors can make your exception unusable in certain scenarios. For example, the serialization constructor is required for handling exceptions in XML Web services. |
| Found at: |
|
| Resolution: |
Add the following constructor to 'CruiseControlRemotingException': public CruiseControlRemotingException(String, Exception). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182151(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseControlRemotingException - #.ctor(System.String,System.String,System.Exception) |
Breaking |
75 %
|
Identifiers should be spelled correctly |
|
| Rule: |
Identifiers should be spelled correctly |
| Check Id: |
CA1704 |
| Category: |
Microsoft.Naming |
| Description: |
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. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseControlRemotingException.cs at line 12 |
| Resolution: |
In method 'CruiseControlRemotingException.CruiseControlRemotingException(string, string, Exception)', consider providing a more meaningful name than parameter name 'e'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264492(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseControlRemotingException - #.ctor(System.String,System.String,System.Exception) |
Breaking |
60 %
|
URI parameters should not be strings |
|
| Rule: |
URI parameters should not be strings |
| Check Id: |
CA1054 |
| Category: |
Microsoft.Design |
| Description: |
If a parameter name contains "uri" or "url" or "urn", and it's typed as string, the parameter type should be changed to System.Uri, unless there is an overload method where the same parameter is typed as System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseControlRemotingException.cs at line 12 |
| Resolution: |
Change the type of parameter 'url' of method 'CruiseControlRemotingException.CruiseControlRemotingException(string, string, Exception)' from string to System.Uri, or provide an overload of 'CruiseControlRemotingException.CruiseControlRemotingException(string, string, Exception)', that allows 'url' to be passed as a System.Uri object. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182174(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseControlRemotingException - #CreateMessage(System.String,System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseControlRemotingException.cs at line 17 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'CruiseControlRemotingException.CreateMessage(string, string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseManager - #GenerateProjectRequest(System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseManager.cs at line 323 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'CruiseManager.GenerateProjectRequest(string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseManager - #GenerateServerRequest() |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseManager.cs at line 310 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'CruiseManager.GenerateServerRequest()' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseManager - #GetFreeDiskSpace() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseManager.cs at line 282 |
| Resolution: |
Because the behavior of 'Convert.ToInt64(string)' could vary based on the current user's locale settings, replace this call in 'CruiseManager.GetFreeDiskSpace()' with a call to 'Convert.ToInt64(string, IFormatProvider)'. If the result of 'Convert.ToInt64(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseManager - #InitializeLifetimeService() |
Breaking |
33 %
|
Override link demands should be identical to base |
|
| Rule: |
Override link demands should be identical to base |
| Check Id: |
CA2123 |
| Category: |
Microsoft.Security |
| Description: |
If a virtual method has a LinkDemand, in many cases, so should any override of it, and if an override has a LinkDemand, so should the overridden virtual method. Because it is possible to call any of the overrides of a virtual method explicitly, they should all have the same LinkDemand status or, if not, should be reviewed. This also applies to LinkDemand security checks for methods that part of an interface implementation, because the caller might use an interface-typed reference to access the method. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseManager.cs at line 34 |
| Resolution: |
Add the following security attribute to 'CruiseManager.InitializeLifetimeService()' in order to match a LinkDemand on base method 'MarshalByRefObject.InitializeLifetimeService()': [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182305(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseManager - #ValidateResponse(ThoughtWorks.CruiseControl.Remote.Messages.Response) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseManager.cs at line 336 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'CruiseManager.ValidateResponse(Response)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - CruiseServer |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
|
| Resolution: |
Provide an overridable implementation of Dispose(bool) on 'CruiseServer' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #.ctor(ThoughtWorks.CruiseControl.Core.Config.IConfigurationService,ThoughtWorks.CruiseControl.Core.IProjectIntegratorListFactory,ThoughtWorks.CruiseControl.Core.IProjectSerializer,ThoughtWorks.CruiseControl.Core.State.IProjectStateManager,ThoughtWorks.CruiseControl.Core.Util.IFileSystem,ThoughtWorks.CruiseControl.Core.Util.IExecutionEnvironment,System.Collections.Generic.List`1<ThoughtWorks.CruiseControl.Remote.ExtensionConfiguration>) |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 39 |
| Resolution: |
Change 'List<ExtensionConfiguration>' in 'CruiseServer.CruiseServer(IConfigurationService, IProjectIntegratorListFactory, IProjectSerializer, IProjectStateManager, IFileSystem, IExecutionEnvironment, List<ExtensionConfiguration>)' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #.ctor(ThoughtWorks.CruiseControl.Core.Config.IConfigurationService,ThoughtWorks.CruiseControl.Core.IProjectIntegratorListFactory,ThoughtWorks.CruiseControl.Core.IProjectSerializer,ThoughtWorks.CruiseControl.Core.State.IProjectStateManager,ThoughtWorks.CruiseControl.Core.Util.IFileSystem,ThoughtWorks.CruiseControl.Core.Util.IExecutionEnvironment,System.Collections.Generic.List`1<ThoughtWorks.CruiseControl.Remote.ExtensionConfiguration>) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 100 |
| Resolution: |
Because the behavior of 'Convert.ToDouble(string)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.CruiseServer(IConfigurationService, IProjectIntegratorListFactory, IProjectSerializer, IProjectStateManager, IFileSystem, IExecutionEnvironment, List<ExtensionConfiguration>)' with a call to 'Convert.ToDouble(string, IFormatProvider)'. If the result of 'Convert.ToDouble(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #.ctor(ThoughtWorks.CruiseControl.Core.Config.IConfigurationService,ThoughtWorks.CruiseControl.Core.IProjectIntegratorListFactory,ThoughtWorks.CruiseControl.Core.IProjectSerializer,ThoughtWorks.CruiseControl.Core.State.IProjectStateManager,ThoughtWorks.CruiseControl.Core.Util.IFileSystem,ThoughtWorks.CruiseControl.Core.Util.IExecutionEnvironment,System.Collections.Generic.List`1<ThoughtWorks.CruiseControl.Remote.ExtensionConfiguration>) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 109 |
| Resolution: |
Because the behavior of 'double.ToString()' could vary based on the current user's locale settings, replace this call in 'CruiseServer.CruiseServer(IConfigurationService, IProjectIntegratorListFactory, IProjectSerializer, IProjectStateManager, IFileSystem, IExecutionEnvironment, List<ExtensionConfiguration>)' with a call to 'double.ToString(IFormatProvider)'. If the result of 'double.ToString(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #ChangePassword(ThoughtWorks.CruiseControl.Remote.Messages.ChangePasswordRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1236 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.ChangePassword(ChangePasswordRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #CheckSecurity(System.String,System.String,ThoughtWorks.CruiseControl.Core.Security.SecurityPermission,System.Nullable`1<ThoughtWorks.CruiseControl.Remote.Security.SecurityEvent>) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1673 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.CheckSecurity(string, string, SecurityPermission, SecurityEvent?)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #CheckSecurity(System.String,System.String,ThoughtWorks.CruiseControl.Core.Security.SecurityPermission,System.Nullable`1<ThoughtWorks.CruiseControl.Remote.Security.SecurityEvent>) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1709 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.CheckSecurity(string, string, SecurityPermission, SecurityEvent?)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #CheckSecurity(System.String,System.String,ThoughtWorks.CruiseControl.Core.Security.SecurityPermission,System.Nullable`1<ThoughtWorks.CruiseControl.Remote.Security.SecurityEvent>) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1746 |
| Resolution: |
Because the behavior of 'string.Format(string, params object[])' could vary based on the current user's locale settings, replace this call in 'CruiseServer.CheckSecurity(string, string, SecurityPermission, SecurityEvent?)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #DiagnoseSecurityPermissions(ThoughtWorks.CruiseControl.Remote.Messages.DiagnoseSecurityRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1178 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.DiagnoseSecurityPermissions(DiagnoseSecurityRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #DiagnoseSecurityPermissions(ThoughtWorks.CruiseControl.Remote.Messages.DiagnoseSecurityRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1182 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.DiagnoseSecurityPermissions(DiagnoseSecurityRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #Dispose() |
NonBreaking |
75 %
|
Call GC.SuppressFinalize correctly |
|
| Rule: |
Call GC.SuppressFinalize correctly |
| Check Id: |
CA1816 |
| Category: |
Microsoft.Usage |
| Description: |
Call GC.SuppressFinalize to suppress finalization of your instance once Dispose has been called. Objects that implement IDisposable should call SuppressFinalize from the IDisposable.Dispose method to prevent the garbage collector from calling Object.Finalize on an object that does not require it. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 881 |
| Resolution: |
Change 'CruiseServer.Dispose()' to call 'GC.SuppressFinalize(object)'. This will prevent unnecessary finalization of the object once it has been disposed and it has fallen out of scope. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182269(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #Dispose() |
NonBreaking |
75 %
|
Disposable fields should be disposed |
|
| Rule: |
Disposable fields should be disposed |
| Check Id: |
CA2213 |
| Category: |
Microsoft.Usage |
| Description: |
If a type that implements IDisposable owns fields that also implement IDisposable, the encapsulating type's Dispose() implementation should call Dispose() on each disposable field. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 881 |
| Resolution: |
'CruiseServer' contains field 'CruiseServer.monitor' that is of IDisposable type: 'ManualResetEvent'. Change the Dispose method on 'CruiseServer' to call Dispose or Close on this field. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182328(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #Dispose() |
Breaking |
95 %
|
Implement IDisposable correctly |
|
| Rule: |
Implement IDisposable correctly |
| Check Id: |
CA1063 |
| Category: |
Microsoft.Design |
| Description: |
All IDisposable types should implement the Dispose pattern correctly. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 881 |
| Resolution: |
Modify 'CruiseServer.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns. |
| Help Link: |
http://msdn2.microsoft.com/library/ms244737(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #GetFreeDiskSpace(ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 920 |
| Resolution: |
Because the behavior of 'long.ToString()' could vary based on the current user's locale settings, replace this call in 'CruiseServer.GetFreeDiskSpace(ServerRequest)' with a call to 'long.ToString(IFormatProvider)'. If the result of 'long.ToString(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #GetServerLog(ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest) |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 635 |
| Resolution: |
'request', a parameter, is cast to type 'ProjectRequest' multiple times in method 'CruiseServer.GetServerLog(ServerRequest)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant isint instruction. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182271(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #InitialiseExtensions(System.Collections.Generic.List`1<ThoughtWorks.CruiseControl.Remote.ExtensionConfiguration>) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1569 |
| Resolution: |
'CruiseServer.InitialiseExtensions(List<ExtensionConfiguration>)' creates an exception of type 'NullReferenceException', an exception type that is reserved by the runtime and should never be raised by managed code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #InitialiseExtensions(System.Collections.Generic.List`1<ThoughtWorks.CruiseControl.Remote.ExtensionConfiguration>) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1569 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.InitialiseExtensions(List<ExtensionConfiguration>)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #InitializeServerThread() |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1587 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'CruiseServer.InitializeServerThread()' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #ListBuildParameters(ThoughtWorks.CruiseControl.Remote.Messages.ProjectRequest) |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1286 |
| Resolution: |
'project', a variable, is cast to type 'IParamatisedProject' multiple times in method 'CruiseServer.ListBuildParameters(ProjectRequest)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant isint instruction. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182271(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #ResetPassword(ThoughtWorks.CruiseControl.Remote.Messages.ChangePasswordRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1258 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.ResetPassword(ChangePasswordRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RetrieveFileTransfer(ThoughtWorks.CruiseControl.Remote.Messages.FileTransferRequest) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1059 |
| Resolution: |
Modify 'CruiseServer.RetrieveFileTransfer(FileTransferRequest)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RetrieveFileTransfer(ThoughtWorks.CruiseControl.Remote.Messages.FileTransferRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1035 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.RetrieveFileTransfer(FileTransferRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RetrieveFileTransfer(ThoughtWorks.CruiseControl.Remote.Messages.FileTransferRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1049 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServer.RetrieveFileTransfer(FileTransferRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RetrieveFileTransfer(ThoughtWorks.CruiseControl.Remote.Messages.FileTransferRequest) |
NonBreaking |
75 %
|
Use ordinal StringComparison |
|
| Rule: |
Use ordinal StringComparison |
| Check Id: |
CA1309 |
| Category: |
Microsoft.Globalization |
| Description: |
For non-linguistic comparisons, StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase should be used instead of the linguistically-sensitive StringComparison.InvariantCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1033 |
| Resolution: |
'CruiseServer.RetrieveFileTransfer(FileTransferRequest)' passes StringComparison.InvariantCultureIgnoreCase as an argument to 'string.StartsWith(string, StringComparison)'. Replace this usage with StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/bb385972(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RetrieveLogData(System.String,System.String,System.Boolean) |
Breaking |
95 %
|
Do not raise reserved exception types |
|
| Rule: |
Do not raise reserved exception types |
| Check Id: |
CA2201 |
| Category: |
Microsoft.Usage |
| Description: |
User code should not create and raise exceptions of certain types that are reserved by the runtime or which are of a too general exception type. Exception types that are too general include Exception, SystemException, and ApplicationException. Exception types that are reserved by the runtime include ThreadAbortException, OutOfMemoryException, ExecutionEngineException, and IndexOutOfRangeException. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1929 |
| Resolution: |
'CruiseServer.RetrieveLogData(string, string, bool)' creates an exception of type 'ApplicationException', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182338(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RetrieveLogData(System.String,System.String,System.Boolean) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1911 |
| Resolution: |
Because the behavior of 'int.ToString()' could vary based on the current user's locale settings, replace this call in 'CruiseServer.RetrieveLogData(string, string, bool)' with a call to 'int.ToString(IFormatProvider)'. If the result of 'int.ToString(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RunProjectRequest(ThoughtWorks.CruiseControl.Remote.Messages.ProjectRequest,System.Nullable`1<ThoughtWorks.CruiseControl.Core.Security.SecurityPermission>,System.Nullable`1<ThoughtWorks.CruiseControl.Remote.Security.SecurityEvent>,ThoughtWorks.CruiseControl.Core.CruiseServer+ProjectRequestAction) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1410 |
| Resolution: |
Modify 'CruiseServer.RunProjectRequest(ProjectRequest, SecurityPermission?, SecurityEvent?, CruiseServer.ProjectRequestAction)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServer - #RunServerRequest(ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest,System.Nullable`1<ThoughtWorks.CruiseControl.Core.Security.SecurityPermission>,System.Nullable`1<ThoughtWorks.CruiseControl.Remote.Security.SecurityEvent>,System.Action`1<ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest>) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServer.cs at line 1455 |
| Resolution: |
Modify 'CruiseServer.RunServerRequest(ServerRequest, SecurityPermission?, SecurityEvent?, Action<ServerRequest>)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #channelSecurity |
NonBreaking |
75 %
|
Avoid unused private fields |
|
| Rule: |
Avoid unused private fields |
| Check Id: |
CA1823 |
| Category: |
Microsoft.Performance |
| Description: |
Private fields were detected that do not appear to be accessed within the assembly. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
It appears that field 'CruiseServerClient.channelSecurity' is never used or is only ever assigned to. Use this field or remove it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245042(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #ExtractAndInvokeMessage(System.String,System.String,System.Object) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerClient.cs at line 786 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServerClient.ExtractAndInvokeMessage(string, string, object)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #InitializeLifetimeService() |
Breaking |
33 %
|
Override link demands should be identical to base |
|
| Rule: |
Override link demands should be identical to base |
| Check Id: |
CA2123 |
| Category: |
Microsoft.Security |
| Description: |
If a virtual method has a LinkDemand, in many cases, so should any override of it, and if an override has a LinkDemand, so should the overridden virtual method. Because it is possible to call any of the overrides of a virtual method explicitly, they should all have the same LinkDemand status or, if not, should be reviewed. This also applies to LinkDemand security checks for methods that part of an interface implementation, because the caller might use an interface-typed reference to access the method. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerClient.cs at line 475 |
| Resolution: |
Add the following security attribute to 'CruiseServerClient.InitializeLifetimeService()' in order to match a LinkDemand on base method 'MarshalByRefObject.InitializeLifetimeService()': [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182305(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #ListServers(ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest) |
DependsOnFix |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerClient.cs at line 659 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'CruiseServerClient.ListServers(ServerRequest)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #ListServers(ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest) |
DependsOnFix |
95 %
|
Review unused parameters |
|
| Rule: |
Review unused parameters |
| Check Id: |
CA1801 |
| Category: |
Microsoft.Usage |
| Description: |
Review parameters in non-virtual methods that are not used in the method body to ensure no correctness exists around failure to access them. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerClient.cs at line 659 |
| Resolution: |
Parameter 'request' of 'CruiseServerClient.ListServers(ServerRequest)' is never used. Remove the parameter or use it in the method body. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182268(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #ProcessMessage(System.String,System.String) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerClient.cs at line 411 |
| Resolution: |
Modify 'CruiseServerClient.ProcessMessage(string, string)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #ProcessMessage(System.String,ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerClient.cs at line 453 |
| Resolution: |
Modify 'CruiseServerClient.ProcessMessage(string, ServerRequest)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerClient - #ProcessMessage(System.String,ThoughtWorks.CruiseControl.Remote.Messages.ServerRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerClient.cs at line 440 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'CruiseServerClient.ProcessMessage(string, ServerRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
#Expiry - #get_Expiry() |
NonBreaking |
75 %
|
Avoid uncalled private code |
|
| Rule: |
Avoid uncalled private code |
| Check Id: |
CA1811 |
| Category: |
Microsoft.Performance |
| Description: |
There is uncalled code that is not externally visible and is not a known runtime entry point. If this violation fires in error, please send a problem report to the Visual Studio Code Analysis team. |
| Found at: |
|
| Resolution: |
'CruiseServerClient.SecureConnection.Expiry.get()' appears to have no upstream public or protected callers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182264(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireAbortBuildProcessed(System.String,System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 200 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireAbortBuildProcessed(string, string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireAbortBuildReceived(System.String,System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 183 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireAbortBuildReceived(string, string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireForceBuildProcessed(System.String,System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 166 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireForceBuildProcessed(string, string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireForceBuildReceived(System.String,System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 149 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireForceBuildReceived(string, string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireIntegrationCompleted(ThoughtWorks.CruiseControl.Remote.IntegrationRequest,System.String,ThoughtWorks.CruiseControl.Remote.IntegrationStatus) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 268 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireIntegrationCompleted(IntegrationRequest, string, IntegrationStatus)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireIntegrationStarted(ThoughtWorks.CruiseControl.Remote.IntegrationRequest,System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 250 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireIntegrationStarted(IntegrationRequest, string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireProjectStarted(System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 100 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireProjectStarted(string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireProjectStarting(System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 84 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireProjectStarting(string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireProjectStopped(System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 132 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireProjectStopped(string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireProjectStopping(System.String) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 116 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireProjectStopping(string)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireSendMessageProcessed(System.String,ThoughtWorks.CruiseControl.Remote.Message) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 234 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireSendMessageProcessed(string, Message)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseServerEventsBase - #FireSendMessageReceived(System.String,ThoughtWorks.CruiseControl.Remote.Message) |
NonBreaking |
75 %
|
Use events where appropriate |
|
| Rule: |
Use events where appropriate |
| Check Id: |
CA1030 |
| Category: |
Microsoft.Design |
| Description: |
A method name suggestive of event functionality was encountered. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseServerEventsBase.cs at line 217 |
| Resolution: |
Consider making 'CruiseServerEventsBase.FireSendMessageReceived(string, Message)' an event. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182177(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseXmlWriter - #Write(System.Collections.Generic.IEnumerable`1<ThoughtWorks.CruiseControl.Remote.CruiseServerSnapshot>) |
DependsOnFix |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseXmlWriter.cs at line 13 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'CruiseXmlWriter.Write(IEnumerable<CruiseServerSnapshot>)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
CruiseXmlWriter - #Write(System.Collections.Generic.IEnumerable`1<ThoughtWorks.CruiseControl.Remote.CruiseServerSnapshot>) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\CruiseXmlWriter.cs at line 13 |
| Resolution: |
Because the behavior of 'StringWriter.StringWriter()' could vary based on the current user's locale settings, replace this call in 'CruiseXmlWriter.Write(IEnumerable<CruiseServerSnapshot>)' with a call to 'StringWriter.StringWriter(IFormatProvider)'. If the result of 'StringWriter.StringWriter(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IConfiguration - #QueueConfigurations |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<IQueueConfiguration>' in 'IConfiguration.QueueConfigurations' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IIntegrationRepository - #GetLatestBuildName() |
Breaking |
50 %
|
Use properties where appropriate |
|
| Rule: |
Use properties where appropriate |
| Check Id: |
CA1024 |
| Category: |
Microsoft.Design |
| Description: |
Properties should be used instead of Get/Set methods in most situations. Methods are preferable to properties in the following situations: the operation is a conversion, is expensive or has an observable side-effect; the order of execution is important; calling the member twice in succession creates different results; a member is static but returns a mutable value; or the member returns an array. |
| Found at: |
|
| Resolution: |
Change 'IIntegrationRepository.GetLatestBuildName()' to a property if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182181(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - IIntegrationResult |
Breaking |
90 %
|
Avoid overloads in COM visible interfaces |
|
| Rule: |
Avoid overloads in COM visible interfaces |
| Check Id: |
CA1402 |
| Category: |
Microsoft.Interoperability |
| Description: |
Interfaces that are visible to COM should not define overloads, as they will be renamed and cannot be implemented by Visual Basic 6 clients. COM interfaces cannot contain overloaded methods. |
| Found at: |
|
| Resolution: |
ComVisible(true) interface 'IIntegrationResult' defines overloaded methods. Give each method a unique name or make the type ComVisible(false). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182197(VS.90).aspx |
| Rule File: |
InteroperabilityRules.dll Version: 9.0.0.0 |
|
 |
 |
IIntegrationResult - #Modifications |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
|
| Resolution: |
Change 'IIntegrationResult.Modifications' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
IIntegrationResult - #Parameters |
Breaking |
75 %
|
Collection properties should be read only |
|
| Rule: |
Collection properties should be read only |
| Check Id: |
CA2227 |
| Category: |
Microsoft.Usage |
| Description: |
Properties that return collections should be read-only so that users cannot entirely replace the backing store. Users can still modify the contents of the collection by calling relevant methods on the collection. Note that the XmlSerializer class has special support for deserializing read-only collections. See the XmlSerializer overview for more information. |
| Found at: |
|
| Resolution: |
Change 'IIntegrationResult.Parameters' to be read-only by removing the property setter. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182327(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
IIntegrationResult - #Parameters |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<NameValuePair>' in 'IIntegrationResult.Parameters' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IIntegrationResult - #ProjectUrl |
Breaking |
75 %
|
URI properties should not be strings |
|
| Rule: |
URI properties should not be strings |
| Check Id: |
CA1056 |
| Category: |
Microsoft.Design |
| Description: |
If a property name contains "uri" or "url" or "urn" and it's typed as string, it should be changed to System.Uri. |
| Found at: |
|
| Resolution: |
Change the type of property 'IIntegrationResult.ProjectUrl' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182175(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IIntegrationResult - #SourceControlData |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<NameValuePair>' in 'IIntegrationResult.SourceControlData' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - IMergeTask |
Breaking |
90 %
|
Avoid empty interfaces |
|
| Rule: |
Avoid empty interfaces |
| Check Id: |
CA1040 |
| Category: |
Microsoft.Design |
| Description: |
Interfaces are meant to contain members that specify a set of behaviors. To mark or label a class, use an attribute instead of an empty interface. |
| Found at: |
|
| Resolution: |
Define a custom attribute to replace 'IMergeTask'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182128(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
INetReflectorConfigurationReader - #ParseElement(System.Xml.XmlNode) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
|
| Resolution: |
Modify member 'INetReflectorConfigurationReader.ParseElement(XmlNode)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
INetReflectorConfigurationReader - #Read(System.Xml.XmlDocument,ThoughtWorks.CruiseControl.Core.Config.IConfigurationErrorProcesser) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
|
| Resolution: |
Modify member 'INetReflectorConfigurationReader.Read(XmlDocument, IConfigurationErrorProcesser)' so that it no longer exposes the concrete type 'XmlDocument'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - IntegrationPropertyNames |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'IntegrationPropertyNames'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #buildProgressInformation |
NonBreaking |
95 %
|
Mark all non-serializable fields |
|
| Rule: |
Mark all non-serializable fields |
| Check Id: |
CA2235 |
| Category: |
Microsoft.Usage |
| Description: |
All fields that cannot be serialized directly should have the NonSerializedAttribute. Types that have the SerializableAttribute should not have fields of types that do not have the SerializableAttribute unless the fields are marked with the NonSerializedAttribute. |
| Found at: |
|
| Resolution: |
Field 'IntegrationResult.buildProgressInformation' is a member of type 'IntegrationResult', which is serializable, but is of type 'BuildProgressInformation', which is not serializable. Add the NonSerializedAttribute to 'IntegrationResult.buildProgressInformation'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182349(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #FailureUsers |
Breaking |
75 %
|
Collection properties should be read only |
|
| Rule: |
Collection properties should be read only |
| Check Id: |
CA2227 |
| Category: |
Microsoft.Usage |
| Description: |
Properties that return collections should be read-only so that users cannot entirely replace the backing store. Users can still modify the contents of the collection by calling relevant methods on the collection. Note that the XmlSerializer class has special support for deserializing read-only collections. See the XmlSerializer overview for more information. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResult.cs at line 394 |
| Resolution: |
Change 'IntegrationResult.FailureUsers' to be read-only by removing the property setter. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182327(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #lastIntegration |
NonBreaking |
95 %
|
Mark all non-serializable fields |
|
| Rule: |
Mark all non-serializable fields |
| Check Id: |
CA2235 |
| Category: |
Microsoft.Usage |
| Description: |
All fields that cannot be serialized directly should have the NonSerializedAttribute. Types that have the SerializableAttribute should not have fields of types that do not have the SerializableAttribute unless the fields are marked with the NonSerializedAttribute. |
| Found at: |
|
| Resolution: |
Field 'IntegrationResult.lastIntegration' is a member of type 'IntegrationResult', which is serializable, but is of type 'IntegrationSummary', which is not serializable. Add the NonSerializedAttribute to 'IntegrationResult.lastIntegration'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182349(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #modifications |
NonBreaking |
95 %
|
Mark all non-serializable fields |
|
| Rule: |
Mark all non-serializable fields |
| Check Id: |
CA2235 |
| Category: |
Microsoft.Usage |
| Description: |
All fields that cannot be serialized directly should have the NonSerializedAttribute. Types that have the SerializableAttribute should not have fields of types that do not have the SerializableAttribute unless the fields are marked with the NonSerializedAttribute. |
| Found at: |
|
| Resolution: |
Field 'IntegrationResult.modifications' is a member of type 'IntegrationResult', which is serializable, but is of type 'Modification[]', which is not serializable. Add the NonSerializedAttribute to 'IntegrationResult.modifications'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182349(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
#NumericLabel - #get_NumericLabel() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResult.cs at line 129 |
| Resolution: |
Because the behavior of 'int.Parse(string)' could vary based on the current user's locale settings, replace this call in 'IntegrationResult.NumericLabel.get()' with a call to 'int.Parse(string, IFormatProvider)'. If the result of 'int.Parse(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #Parameters |
Breaking |
75 %
|
Collection properties should be read only |
|
| Rule: |
Collection properties should be read only |
| Check Id: |
CA2227 |
| Category: |
Microsoft.Usage |
| Description: |
Properties that return collections should be read-only so that users cannot entirely replace the backing store. Users can still modify the contents of the collection by calling relevant methods on the collection. Note that the XmlSerializer class has special support for deserializing read-only collections. See the XmlSerializer overview for more information. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResult.cs at line 107 |
| Resolution: |
Change 'IntegrationResult.Parameters' to be read-only by removing the property setter. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182327(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #Parameters |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResult.cs at line 107 |
| Resolution: |
Change 'List<NameValuePair>' in 'IntegrationResult.Parameters' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #SourceControlData |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResult.cs at line 572 |
| Resolution: |
Change 'List<NameValuePair>' in 'IntegrationResult.SourceControlData' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResult - #ToString() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResult.cs at line 449 |
| Resolution: |
Because the behavior of 'string.Format(string, params object[])' could vary based on the current user's locale settings, replace this call in 'IntegrationResult.ToString()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResultManager - #FinishIntegration() |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResultManager.cs at line 87 |
| Resolution: |
Modify 'IntegrationResultManager.FinishIntegration()' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationResultManager - #StartNewIntegration(ThoughtWorks.CruiseControl.Remote.IntegrationRequest) |
Breaking |
95 %
|
Parameter names should match base declaration |
|
| Rule: |
Parameter names should match base declaration |
| Check Id: |
CA1725 |
| Category: |
Microsoft.Naming |
| Description: |
For usability reasons, parameter names in overridden methods should match those of the base declaration. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationResultManager.cs at line 62 |
| Resolution: |
In member 'IntegrationResultManager.StartNewIntegration(IntegrationRequest)', change parameter name 'request' to 'buildCondition' in order to match the identifier as it has been declared in 'IIntegrationResultManager.StartNewIntegration(IntegrationRequest)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182251(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationRunner - #CompleteIntegration(ThoughtWorks.CruiseControl.Core.IIntegrationResult) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationRunner.cs at line 174 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'IntegrationRunner.CompleteIntegration(IIntegrationResult)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationRunner - #GenerateSystemParameterValues(ThoughtWorks.CruiseControl.Core.IIntegrationResult) |
DependsOnFix |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationRunner.cs at line 141 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'IntegrationRunner.GenerateSystemParameterValues(IIntegrationResult)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationRunner - #GenerateSystemParameterValues(ThoughtWorks.CruiseControl.Core.IIntegrationResult) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationRunner.cs at line 145 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'IntegrationRunner.GenerateSystemParameterValues(IIntegrationResult)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationRunner - #Integrate(ThoughtWorks.CruiseControl.Remote.IntegrationRequest) |
NonBreaking |
95 %
|
Do not catch general exception types |
|
| Rule: |
Do not catch general exception types |
| Check Id: |
CA1031 |
| Category: |
Microsoft.Design |
| Description: |
You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationRunner.cs at line 60 |
| Resolution: |
Modify 'IntegrationRunner.Integrate(IntegrationRequest)' to catch a more specific exception than 'Exception' or rethrow the exception. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182137(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationRunner - #Integrate(ThoughtWorks.CruiseControl.Remote.IntegrationRequest) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationRunner.cs at line 64 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'IntegrationRunner.Integrate(IntegrationRequest)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationRunner - #target |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'IntegrationRunner.target' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - IntegrationStatusParser |
Breaking |
90 %
|
Static holder types should not have constructors |
|
| Rule: |
Static holder types should not have constructors |
| Check Id: |
CA1053 |
| Category: |
Microsoft.Design |
| Description: |
Instances of types that define only static members do not need to be created. Many compilers will automatically add a public default constructor if no constructor is specified. To prevent this, adding an empty private constructor may be required. |
| Found at: |
|
| Resolution: |
Remove the public constructors from 'IntegrationStatusParser'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182169(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationSummary - #FailureUsers |
Breaking |
75 %
|
Collection properties should be read only |
|
| Rule: |
Collection properties should be read only |
| Check Id: |
CA2227 |
| Category: |
Microsoft.Usage |
| Description: |
Properties that return collections should be read-only so that users cannot entirely replace the backing store. Users can still modify the contents of the collection by calling relevant methods on the collection. Note that the XmlSerializer class has special support for deserializing read-only collections. See the XmlSerializer overview for more information. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationSummary.cs at line 72 |
| Resolution: |
Change 'IntegrationSummary.FailureUsers' to be read-only by removing the property setter. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182327(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationSummary - #Initial |
NonBreaking |
25 %
|
Do not declare read only mutable reference types |
|
| Rule: |
Do not declare read only mutable reference types |
| Check Id: |
CA2104 |
| Category: |
Microsoft.Security |
| Description: |
A read-only declaration for a mutable reference type does not prevent the field's instance data from being modified. For example, a read-only StringBuilder field declaration does not make sense, since the data encapsulated by the StringBuilder can be modified using the read-only reference. |
| Found at: |
|
| Resolution: |
Remove the read-only designation from 'IntegrationSummary.Initial' or change the field to one that is an immutable reference type. If the reference type 'IntegrationSummary' is, in fact, immutable, exclude this message. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182302(VS.90).aspx |
| Rule File: |
SecurityRules.dll Version: 9.0.0.0 |
|
 |
 |
IntegrationSummary - #ToString() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\IntegrationSummary.cs at line 42 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'IntegrationSummary.ToString()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
IParamatisedProject - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<ParameterBase>' in 'IParamatisedProject.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - IProject |
Breaking |
90 %
|
Avoid overloads in COM visible interfaces |
|
| Rule: |
Avoid overloads in COM visible interfaces |
| Check Id: |
CA1402 |
| Category: |
Microsoft.Interoperability |
| Description: |
Interfaces that are visible to COM should not define overloads, as they will be renamed and cannot be implemented by Visual Basic 6 clients. COM interfaces cannot contain overloaded methods. |
| Found at: |
|
| Resolution: |
ComVisible(true) interface 'IProject' defines overloaded methods. Give each method a unique name or make the type ComVisible(false). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182197(VS.90).aspx |
| Rule File: |
InteroperabilityRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #ExternalLinks |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
|
| Resolution: |
Change 'IProject.ExternalLinks' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #LinkedSites |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
|
| Resolution: |
Change 'IProject.LinkedSites' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #RetrievePackageList() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<PackageDetails>' in 'IProject.RetrievePackageList()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #RetrievePackageList(System.String) |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
|
| Resolution: |
Change 'List<PackageDetails>' in 'IProject.RetrievePackageList(string)' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #RSSFeed |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'RSS' in member name 'IProject.RSSFeed' by changing it to 'Rss'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #stopProjectOnReachingMaxSourceControlRetries |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'stop' in member name 'IProject.stopProjectOnReachingMaxSourceControlRetries' by changing it to 'Stop'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #WebURL |
Breaking |
85 %
|
Identifiers should be cased correctly |
|
| Rule: |
Identifiers should be cased correctly |
| Check Id: |
CA1709 |
| Category: |
Microsoft.Naming |
| Description: |
Type, namespace, and member identifiers are Pascal-cased. Parameter identifiers are camel-cased. Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io. Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. |
| Found at: |
|
| Resolution: |
Correct the casing of 'URL' in member name 'IProject.WebURL' by changing it to 'Url'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182240(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
IProject - #WebURL |
Breaking |
75 %
|
URI properties should not be strings |
|
| Rule: |
URI properties should not be strings |
| Check Id: |
CA1056 |
| Category: |
Microsoft.Design |
| Description: |
If a property name contains "uri" or "url" or "urn" and it's typed as string, it should be changed to System.Uri. |
| Found at: |
|
| Resolution: |
Change the type of property 'IProject.WebURL' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182175(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
IProjectIntegrator - #Request(ThoughtWorks.CruiseControl.Remote.IntegrationRequest) |
Breaking |
95 %
|
Parameter names should not match member names |
|
| Rule: |
Parameter names should not match member names |
| Check Id: |
CA1719 |
| Category: |
Microsoft.Naming |
| Description: |
Parameter names should be distinct from member names. |
| Found at: |
|
| Resolution: |
Change either member or parameter name 'request' so that one differs from the other. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182252(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
IProjectIntegrator - #Stop() |
Breaking |
95 %
|
Identifiers should not match keywords |
|
| Rule: |
Identifiers should not match keywords |
| Check Id: |
CA1716 |
| Category: |
Microsoft.Naming |
| Description: |
Identifiers which conflict with reserved language keywords should be avoided. Using a reserved keyword as an identifier makes it harder for consumers in other languages to use your API. |
| Found at: |
|
| Resolution: |
Rename virtual/interface member 'IProjectIntegrator.Stop()' so that it no longer conflicts with the reserved language keyword 'Stop'. Using a reserved keyword as the name of a virtual/interface member makes it harder for consumers in other languages to override/implement the member. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182248(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
ISourceControl - #GetModifications(ThoughtWorks.CruiseControl.Core.IIntegrationResult,ThoughtWorks.CruiseControl.Core.IIntegrationResult) |
Breaking |
95 %
|
Identifiers should not match keywords |
|
| Rule: |
Identifiers should not match keywords |
| Check Id: |
CA1716 |
| Category: |
Microsoft.Naming |
| Description: |
Identifiers which conflict with reserved language keywords should be avoided. Using a reserved keyword as an identifier makes it harder for consumers in other languages to use your API. |
| Found at: |
|
| Resolution: |
In virtual/interface member 'ISourceControl.GetModifications(IIntegrationResult, IIntegrationResult)', rename parameter 'to' so that it no longer conflicts with the reserved language keyword 'To'. Using a reserved keyword as the name of a parameter on a virtual/interface member makes it harder for consumers in other languages to override/implement the member. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182248(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #.ctor(System.String) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 20 |
| Resolution: |
In member 'LogFile.LogFile(string)', the discrete term 'filename' in parameter name 'filename' should be expressed as a compound word, 'fileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #.ctor(System.String,System.IFormatProvider) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 30 |
| Resolution: |
In member 'LogFile.LogFile(string, IFormatProvider)', the discrete term 'filename' in parameter name 'filename' should be expressed as a compound word, 'fileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #.ctor(System.String,System.IFormatProvider) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 30 |
| Resolution: |
Because the behavior of 'LogFile.LogFile(string)' could vary based on the current user's locale settings, replace this call in 'LogFile.LogFile(string, IFormatProvider)' with a call to 'LogFile.LogFile(string, IFormatProvider)'. If the result of 'LogFile.LogFile(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #CreateFailedBuildLogFileName() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 69 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'LogFile.CreateFailedBuildLogFileName()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #CreateSuccessfulBuildLogFileName() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 74 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'LogFile.CreateSuccessfulBuildLogFileName()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #Filename |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 64 |
| Resolution: |
The discrete term 'Filename' in member name 'LogFile.Filename' should be expressed as a compound word, 'FileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #FilenameDateFormat |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
|
| Resolution: |
The discrete term 'Filename' in member name 'LogFile.FilenameDateFormat' should be expressed as a compound word, 'FileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #FilenameFormattedDateString |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 79 |
| Resolution: |
The discrete term 'Filename' in member name 'LogFile.FilenameFormattedDateString' should be expressed as a compound word, 'FileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
#FilenameFormattedDateString - #get_FilenameFormattedDateString() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 79 |
| Resolution: |
Because the behavior of 'DateTime.ToString(string)' could vary based on the current user's locale settings, replace this call in 'LogFile.FilenameFormattedDateString.get()' with a call to 'DateTime.ToString(string, IFormatProvider)'. If the result of 'DateTime.ToString(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #FilenamePrefix |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
|
| Resolution: |
The discrete term 'Filename' in member name 'LogFile.FilenamePrefix' should be expressed as a compound word, 'FileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #IsSuccessful(System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 120 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'LogFile.IsSuccessful(string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #ParseLabel(System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 111 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'LogFile.ParseLabel(string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #ValidateFilename(System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 90 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'LogFile.ValidateFilename(string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #ValidateFilename(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 94 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'LogFile.ValidateFilename(string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #ValidateFilename(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 98 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'LogFile.ValidateFilename(string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFile - #ValidateFilename(System.String) |
NonBreaking |
95 %
|
Specify StringComparison |
|
| Rule: |
Specify StringComparison |
| Check Id: |
CA1307 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a StringComparison argument, it should always be called in favor of an overload that does not. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 93 |
| Resolution: |
'LogFile.ValidateFilename(string)' makes a call to 'string.StartsWith(string)' that does not explicitly provide a StringComparison. This should be replaced with a call to 'string.StartsWith(string, StringComparison)'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386080(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - LogFileUtil |
Breaking |
75 %
|
Static holder types should be sealed |
|
| Rule: |
Static holder types should be sealed |
| Check Id: |
CA1052 |
| Category: |
Microsoft.Design |
| Description: |
Static holder types do not provide functionality that derived instances can extend. Inheriting from such a type indicates a flawed design. |
| Found at: |
|
| Resolution: |
Mark 'LogFileUtil' as sealed. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182168(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 216 |
| Resolution: |
In member 'LogFileUtil.CreateUrl(string)', the discrete term 'filename' in parameter name 'filename' should be expressed as a compound word, 'fileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 216 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'LogFileUtil.CreateUrl(string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String) |
Breaking |
60 %
|
URI return values should not be strings |
|
| Rule: |
URI return values should not be strings |
| Check Id: |
CA1055 |
| Category: |
Microsoft.Design |
| Description: |
If a function name contains "uri" or "url" or "urn" and the return type is string, the return type should be changed to System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 216 |
| Resolution: |
Change the return type of 'LogFileUtil.CreateUrl(string)' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182176(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String,System.String) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 221 |
| Resolution: |
In member 'LogFileUtil.CreateUrl(string, string)', the discrete term 'filename' in parameter name 'filename' should be expressed as a compound word, 'fileName'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String,System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 221 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object, object)' could vary based on the current user's locale settings, replace this call in 'LogFileUtil.CreateUrl(string, string)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String,System.String) |
Breaking |
60 %
|
URI return values should not be strings |
|
| Rule: |
URI return values should not be strings |
| Check Id: |
CA1055 |
| Category: |
Microsoft.Design |
| Description: |
If a function name contains "uri" or "url" or "urn" and the return type is string, the return type should be changed to System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 221 |
| Resolution: |
Change the return type of 'LogFileUtil.CreateUrl(string, string)' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182176(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String,ThoughtWorks.CruiseControl.Core.IIntegrationResult) |
Breaking |
60 %
|
URI parameters should not be strings |
|
| Rule: |
URI parameters should not be strings |
| Check Id: |
CA1054 |
| Category: |
Microsoft.Design |
| Description: |
If a parameter name contains "uri" or "url" or "urn", and it's typed as string, the parameter type should be changed to System.Uri, unless there is an overload method where the same parameter is typed as System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 231 |
| Resolution: |
Change the type of parameter 'urlRoot' of method 'LogFileUtil.CreateUrl(string, IIntegrationResult)' from string to System.Uri, or provide an overload of 'LogFileUtil.CreateUrl(string, IIntegrationResult)', that allows 'urlRoot' to be passed as a System.Uri object. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182174(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(System.String,ThoughtWorks.CruiseControl.Core.IIntegrationResult) |
Breaking |
60 %
|
URI return values should not be strings |
|
| Rule: |
URI return values should not be strings |
| Check Id: |
CA1055 |
| Category: |
Microsoft.Design |
| Description: |
If a function name contains "uri" or "url" or "urn" and the return type is string, the return type should be changed to System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 231 |
| Resolution: |
Change the return type of 'LogFileUtil.CreateUrl(string, IIntegrationResult)' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182176(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #CreateUrl(ThoughtWorks.CruiseControl.Core.IIntegrationResult) |
Breaking |
60 %
|
URI return values should not be strings |
|
| Rule: |
URI return values should not be strings |
| Check Id: |
CA1055 |
| Category: |
Microsoft.Design |
| Description: |
If a function name contains "uri" or "url" or "urn" and the return type is string, the return type should be changed to System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 226 |
| Resolution: |
Change the return type of 'LogFileUtil.CreateUrl(IIntegrationResult)' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182176(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #GetLastBuildDate(System.String[],System.DateTime) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 178 |
| Resolution: |
In member 'LogFileUtil.GetLastBuildDate(string[], DateTime)', the discrete term 'filenames' in parameter name 'filenames' should be expressed as a compound word, 'fileNames'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #GetLastBuildDate(System.String[],System.DateTime) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 183 |
| Resolution: |
Because the behavior of 'LogFile.LogFile(string)' could vary based on the current user's locale settings, replace this call in 'LogFileUtil.GetLastBuildDate(string[], DateTime)' with a call to 'LogFile.LogFile(string, IFormatProvider)'. If the result of 'LogFile.LogFile(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #GetLatestBuildNumber(System.String[]) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 163 |
| Resolution: |
In member 'LogFileUtil.GetLatestBuildNumber(string[])', the discrete term 'filenames' in parameter name 'filenames' should be expressed as a compound word, 'fileNames'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #GetLatestBuildNumber(System.String[]) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 166 |
| Resolution: |
Because the behavior of 'LogFile.LogFile(string)' could vary based on the current user's locale settings, replace this call in 'LogFileUtil.GetLatestBuildNumber(string[])' with a call to 'LogFile.LogFile(string, IFormatProvider)'. If the result of 'LogFile.LogFile(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #GetLatestLogFileName(System.String[]) |
Breaking |
80 %
|
Compound words should be cased correctly |
|
| Rule: |
Compound words should be cased correctly |
| Check Id: |
CA1702 |
| Category: |
Microsoft.Naming |
| Description: |
Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 207 |
| Resolution: |
In member 'LogFileUtil.GetLatestLogFileName(string[])', the discrete term 'filenames' in parameter name 'filenames' should be expressed as a compound word, 'fileNames'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb264474(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
LogFileUtil - #GetNumericBuildNumber(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\LogFile.cs at line 173 |
| Resolution: |
Because the behavior of 'int.Parse(string)' could vary based on the current user's locale settings, replace this call in 'LogFileUtil.GetNumericBuildNumber(string)' with a call to 'int.Parse(string, IFormatProvider)'. If the result of 'int.Parse(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - Modification |
NonBreaking |
75 %
|
Override methods on comparable types |
|
| Rule: |
Override methods on comparable types |
| Check Id: |
CA1036 |
| Category: |
Microsoft.Design |
| Description: |
Types that implement IComparable should redefine Equals and comparison operators to keep the meanings of less than, greater than, and equals consistent throughout the type. |
| Found at: |
|
| Resolution: |
'Modification' should define operator '!=' since it implements IComparable. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182163(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #ChangeNumber |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.ChangeNumber' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #Comment |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.Comment' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #CompareTo(System.Object) |
Breaking |
95 %
|
Parameter names should match base declaration |
|
| Rule: |
Parameter names should match base declaration |
| Check Id: |
CA1725 |
| Category: |
Microsoft.Naming |
| Description: |
For usability reasons, parameter names in overridden methods should match those of the base declaration. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\sourcecontrol\Modification.cs at line 54 |
| Resolution: |
In member 'Modification.CompareTo(object)', change parameter name 'o' to 'obj' in order to match the identifier as it has been declared in 'IComparable.CompareTo(object)'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182251(VS.90).aspx |
| Rule File: |
NamingRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #EmailAddress |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.EmailAddress' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #FileName |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.FileName' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #FolderName |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.FolderName' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #IssueUrl |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.IssueUrl' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #ModifiedTime |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.ModifiedTime' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #ToXml() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\sourcecontrol\Modification.cs at line 30 |
| Resolution: |
Because the behavior of 'StringWriter.StringWriter()' could vary based on the current user's locale settings, replace this call in 'Modification.ToXml()' with a call to 'StringWriter.StringWriter(IFormatProvider)'. If the result of 'StringWriter.StringWriter(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #ToXml(System.Xml.XmlWriter) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\sourcecontrol\Modification.cs at line 41 |
| Resolution: |
Because the behavior of 'DateUtil.FormatDate(DateTime)' could vary based on the current user's locale settings, replace this call in 'Modification.ToXml(XmlWriter)' with a call to 'DateUtil.FormatDate(DateTime, IFormatProvider)'. If the result of 'DateUtil.FormatDate(DateTime, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #Type |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.Type' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #Url |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.Url' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #UserName |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.UserName' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Modification - #Version |
Breaking |
90 %
|
Do not declare visible instance fields |
|
| Rule: |
Do not declare visible instance fields |
| Check Id: |
CA1051 |
| Category: |
Microsoft.Design |
| Description: |
Instance fields that are visible outside of the type that declares them, limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. |
| Found at: |
|
| Resolution: |
Because field 'Modification.Version' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182141(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - MultipleIntegrationFailureException |
NonBreaking |
95 %
|
Implement standard exception constructors |
|
| Rule: |
Implement standard exception constructors |
| Check Id: |
CA1032 |
| Category: |
Microsoft.Design |
| Description: |
Multiple constructors are required to correctly implement a custom exception. Missing constructors can make your exception unusable in certain scenarios. For example, the serialization constructor is required for handling exceptions in XML Web services. |
| Found at: |
|
| Resolution: |
Add the following constructor to 'MultipleIntegrationFailureException': protected MultipleIntegrationFailureException(SerializationInfo, StreamingContext). |
| Help Link: |
http://msdn2.microsoft.com/library/ms182151(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - MultipleIntegrationFailureException |
NonBreaking |
95 %
|
Mark ISerializable types with SerializableAttribute |
|
| Rule: |
Mark ISerializable types with SerializableAttribute |
| Check Id: |
CA2237 |
| Category: |
Microsoft.Usage |
| Description: |
The System.Runtime.Serialization.ISerializable interface allows the type to customize its serialization, while the Serializable attribute enables the runtime to recognize the type as being serializable. |
| Found at: |
|
| Resolution: |
Add [Serializable] to 'MultipleIntegrationFailureException' as this type implements ISerializable. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182350(VS.90).aspx |
| Rule File: |
UsageRules.dll Version: 9.0.0.0 |
|
 |
 |
MultipleIntegrationFailureException - #Failures |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\MultipleIntegrationFailureException.cs at line 36 |
| Resolution: |
Change 'MultipleIntegrationFailureException.Failures' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
NetReflectorProjectSerializer - #Serialize(ThoughtWorks.CruiseControl.Core.IProject) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\NetReflectorProjectSerializer.cs at line 13 |
| Resolution: |
Because the behavior of 'StringWriter.StringWriter()' could vary based on the current user's locale settings, replace this call in 'NetReflectorProjectSerializer.Serialize(IProject)' with a call to 'StringWriter.StringWriter(IFormatProvider)'. If the result of 'StringWriter.StringWriter(IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
ThoughtWorks.CruiseControl.Core - Project |
DependsOnFix |
95 %
|
Types that own disposable fields should be disposable |
|
| Rule: |
Types that own disposable fields should be disposable |
| Check Id: |
CA1001 |
| Category: |
Microsoft.Design |
| Description: |
Types that declare disposable members should also implement IDisposable. If the type does not own any unmanaged resources, do not implement a finalizer on it. |
| Found at: |
|
| Resolution: |
Implement IDisposable on 'Project' because it creates members of the following IDisposable types: 'ManualResetEvent'. If 'Project' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182172(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #ContainsInvalidChars(System.String) |
NonBreaking |
95 %
|
Mark members as static |
|
| Rule: |
Mark members as static |
| Check Id: |
CA1822 |
| Category: |
Microsoft.Performance |
| Description: |
Methods which do not access instance data or call instance methods can be marked as static (Shared in Visual Basic). After doing so, the compiler will emit non-virtual call sites to these members which will prevent a check at runtime for each call that ensures the current object pointer is non-null. This can result in a measurable performance gain for performance-sensitive code. In some cases, the failure to access the current object instance represents a correctness issue. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1361 |
| Resolution: |
The 'this' parameter (or 'Me' in Visual Basic) of 'Project.ContainsInvalidChars(string)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. |
| Help Link: |
http://msdn2.microsoft.com/library/ms245046(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #DefaultUrl() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1124 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Project.DefaultUrl()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #DefaultUrl() |
Breaking |
60 %
|
URI return values should not be strings |
|
| Rule: |
URI return values should not be strings |
| Check Id: |
CA1055 |
| Category: |
Microsoft.Design |
| Description: |
If a function name contains "uri" or "url" or "urn" and the return type is string, the return type should be changed to System.Uri. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1124 |
| Resolution: |
Change the return type of 'Project.DefaultUrl()' from string to System.Uri. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182176(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #GenerateSourceControlOperation(ThoughtWorks.CruiseControl.Core.SourceControlOperation) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 647 |
| Resolution: |
Because the behavior of 'string.Format(string, object, object)' could vary based on the current user's locale settings, replace this call in 'Project.GenerateSourceControlOperation(SourceControlOperation)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #GenerateTaskStatuses(System.String,System.Collections.IList) |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 679 |
| Resolution: |
'task', a variable, is cast to type 'IStatusItem' multiple times in method 'Project.GenerateTaskStatuses(string, IList)'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant isint instruction. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182271(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #GetLogPublisher() |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1262 |
| Resolution: |
'publisher', a variable, is cast to type 'XmlLogPublisher' multiple times in method 'Project.GetLogPublisher()'. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182271(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #Initialize() |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1079 |
| Resolution: |
Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Project.Initialize()' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #ListBuildParameters() |
Breaking |
95 %
|
Do not expose generic lists |
|
| Rule: |
Do not expose generic lists |
| Check Id: |
CA1002 |
| Category: |
Microsoft.Design |
| Description: |
Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1571 |
| Resolution: |
Change 'List<ParameterBase>' in 'Project.ListBuildParameters()' to use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> |
| Help Link: |
http://msdn2.microsoft.com/library/ms182142(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #LoadPackageList(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1519 |
| Resolution: |
Because the behavior of 'Convert.ToInt32(string)' could vary based on the current user's locale settings, replace this call in 'Project.LoadPackageList(string)' with a call to 'Convert.ToInt32(string, IFormatProvider)'. If the result of 'Convert.ToInt32(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #LoadPackageList(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1520 |
| Resolution: |
Because the behavior of 'Convert.ToInt64(string)' could vary based on the current user's locale settings, replace this call in 'Project.LoadPackageList(string)' with a call to 'Convert.ToInt64(string, IFormatProvider)'. If the result of 'Convert.ToInt64(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #LoadPackageList(System.String) |
DependsOnFix |
95 %
|
Specify IFormatProvider |
|
| Rule: |
Specify IFormatProvider |
| Check Id: |
CA1305 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture, otherwise, specify CultureInfo.CurrentCulture. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1518 |
| Resolution: |
Because the behavior of 'DateTime.Parse(string)' could vary based on the current user's locale settings, replace this call in 'Project.LoadPackageList(string)' with a call to 'DateTime.Parse(string, IFormatProvider)'. If the result of 'DateTime.Parse(string, IFormatProvider)' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182190(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #LoadPackageList(System.String) |
NonBreaking |
95 %
|
Specify StringComparison |
|
| Rule: |
Specify StringComparison |
| Check Id: |
CA1307 |
| Category: |
Microsoft.Globalization |
| Description: |
If an overload exists that takes a StringComparison argument, it should always be called in favor of an overload that does not. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1514 |
| Resolution: |
'Project.LoadPackageList(string)' makes a call to 'string.StartsWith(string)' that does not explicitly provide a StringComparison. This should be replaced with a call to 'string.StartsWith(string, StringComparison)'. |
| Help Link: |
http://msdn2.microsoft.com/library/bb386080(VS.90).aspx |
| Rule File: |
GlobalizationRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #Parameters |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 193 |
| Resolution: |
Change 'Project.Parameters' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #PrebuildTasks |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
|
| Resolution: |
Change 'Project.PrebuildTasks' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #PreprocessConfiguration(Exortech.NetReflector.NetReflectorTypeTable,System.Xml.XmlNode) |
Breaking |
75 %
|
Members should not expose certain concrete types |
|
| Rule: |
Members should not expose certain concrete types |
| Check Id: |
CA1059 |
| Category: |
Microsoft.Design |
| Description: |
Members should not expose certain concrete types. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 1560 |
| Resolution: |
Modify member 'Project.PreprocessConfiguration(NetReflectorTypeTable, XmlNode)' so that it no longer exposes the concrete type 'XmlNode'. Use IXPathNavigable to represent XML data sources. |
| Help Link: |
http://msdn2.microsoft.com/library/ms182160(VS.90).aspx |
| Rule File: |
DesignRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #Publishers |
Breaking |
50 %
|
Properties should not return arrays |
|
| Rule: |
Properties should not return arrays |
| Check Id: |
CA1819 |
| Category: |
Microsoft.Performance |
| Description: |
Properties that return arrays are prone to code inefficiencies. Consider using a collection or making this a method. See the design guidelines for more information. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 355 |
| Resolution: |
Change 'Project.Publishers' to return a collection or make it a method. |
| Help Link: |
http://msdn2.microsoft.com/library/0fss9skc(VS.90).aspx |
| Rule File: |
PerformanceRules.dll Version: 9.0.0.0 |
|
 |
 |
Project - #PublishResults(ThoughtWorks.CruiseControl.Core.IIntegrationResult,System.Collections.Generic.Dictionary`2<System.String,System.String>) |
NonBreaking |
95 %
|
Do not cast unnecessarily |
|
| Rule: |
Do not cast unnecessarily |
| Check Id: |
CA1800 |
| Category: |
Microsoft.Performance |
| Description: |
Avoid duplicate casts where possible, since there is a cost associated with them. |
| Found at: |
d:\Build\Projects\CruiseControl.NET\SCM\project\core\Project.cs at line 816 |
| Resolution: |
'publisher', a variable, is cast to type 'IParamatisedItem' multiple times in method 'Project.PublishResults(IIntegrationResult, Dictionary<string, st
| | | | |