uppercutbuild 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/NDepend.xml +251 -0
- data/lib/build.bat +32 -0
- data/lib/build/Castle.Core.dll +0 -0
- data/lib/build/Castle.DynamicProxy2.dll +0 -0
- data/lib/build/Castle.MicroKernel.dll +0 -0
- data/lib/build/Castle.Windsor.dll +0 -0
- data/lib/build/UppercuT.xml +5 -0
- data/lib/build/analyze.step +78 -0
- data/lib/build/analyzers/gallio.test.step +145 -0
- data/lib/build/analyzers/mbunit2.test.step +146 -0
- data/lib/build/analyzers/moma.step +143 -0
- data/lib/build/analyzers/ncover.step +186 -0
- data/lib/build/analyzers/ndepend.step +95 -0
- data/lib/build/analyzers/nitriq.step +116 -0
- data/lib/build/analyzers/nunit.test.step +172 -0
- data/lib/build/analyzers/test.step +99 -0
- data/lib/build/compile.step +178 -0
- data/lib/build/customize.bat +41 -0
- data/lib/build/customize.build +76 -0
- data/lib/build/customizers/item.template +50 -0
- data/lib/build/default.build +164 -0
- data/lib/build/deploymentBuilder.step +103 -0
- data/lib/build/environmentBuilder.step +119 -0
- data/lib/build/generateBuildInfo.step +106 -0
- data/lib/build/ilmerge.build +174 -0
- data/lib/build/open.build +103 -0
- data/lib/build/package.step +234 -0
- data/lib/build/policyChecks.step +81 -0
- data/lib/build/updateAssemblies.build +107 -0
- data/lib/build/uppercut.dll +0 -0
- data/lib/build/uppercut.tasks.dll +0 -0
- data/lib/build/versionBuilder.step +148 -0
- data/lib/build/versioners/git.step +106 -0
- data/lib/build/versioners/hg.step +106 -0
- data/lib/build/versioners/svn.step +112 -0
- data/lib/build/versioners/tfs.step +104 -0
- data/lib/build/zip.build +162 -0
- data/lib/deployment/scripts/database.deploy +37 -0
- data/lib/deployment/templates/AppDeployment.bat +9 -0
- data/lib/deployment/templates/DBDeployment.RESTORE.bat +9 -0
- data/lib/deployment/templates/DBDeployment.bat +9 -0
- data/lib/lib/MbUnit2/MbUnit.AddIn.dll +0 -0
- data/lib/lib/MbUnit2/MbUnit.Cons.exe +0 -0
- data/lib/lib/MbUnit2/MbUnit.Cons.exe.config +12 -0
- data/lib/lib/MbUnit2/MbUnit.Framework.2.0.dll +0 -0
- data/lib/lib/MbUnit2/MbUnit.Framework.XML +6929 -0
- data/lib/lib/MbUnit2/MbUnit.Framework.dll +0 -0
- data/lib/lib/MbUnit2/MbUnit.GUI.exe +0 -0
- data/lib/lib/MbUnit2/MbUnit.GUI.exe.config +14 -0
- data/lib/lib/MbUnit2/MbUnit.MSBuild.Tasks.dll +0 -0
- data/lib/lib/MbUnit2/NAnt.Core.dll +0 -0
- data/lib/lib/MbUnit2/NGraphviz.Helpers.dll +0 -0
- data/lib/lib/MbUnit2/NGraphviz.Layout.dll +0 -0
- data/lib/lib/MbUnit2/NGraphviz.dll +0 -0
- data/lib/lib/MbUnit2/QuickGraph.Algorithms.Graphviz.dll +0 -0
- data/lib/lib/MbUnit2/QuickGraph.Algorithms.dll +0 -0
- data/lib/lib/MbUnit2/QuickGraph.dll +0 -0
- data/lib/lib/MbUnit2/Refly.dll +0 -0
- data/lib/lib/MbUnit2/TestDriven.Framework.dll +0 -0
- data/lib/lib/MbUnit2/TestFu.XML +1932 -0
- data/lib/lib/MbUnit2/TestFu.dll +0 -0
- data/lib/lib/MbUnit2/XsdTidy.exe +0 -0
- data/lib/lib/MoMA/Definitions/2.4.0.1-defs.zip +0 -0
- data/lib/lib/MoMA/ICSharpCode.SharpZipLib.dll +0 -0
- data/lib/lib/MoMA/MoMA.Analyzer.dll +0 -0
- data/lib/lib/MoMA/MoMA.exe +0 -0
- data/lib/lib/MoMA/Mono.Cecil.dll +0 -0
- data/lib/lib/MoMA/Reports/Media/fail.png +0 -0
- data/lib/lib/MoMA/Reports/Media/minus.png +0 -0
- data/lib/lib/MoMA/Reports/Media/moma.css +117 -0
- data/lib/lib/MoMA/Reports/Media/moma.js +17 -0
- data/lib/lib/MoMA/Reports/Media/pass.png +0 -0
- data/lib/lib/MoMA/Reports/Media/plus.png +0 -0
- data/lib/lib/MoMA/Resources/button_ok.png +0 -0
- data/lib/lib/MoMA/Resources/dialog-warning.png +0 -0
- data/lib/lib/MoMA/Resources/dialogback.png +0 -0
- data/lib/lib/MoMA/Resources/list-add.png +0 -0
- data/lib/lib/MoMA/Resources/list-directory.png +0 -0
- data/lib/lib/MoMA/Resources/list-remove.png +0 -0
- data/lib/lib/MoMA/Resources/monoback.png +0 -0
- data/lib/lib/MoMA/Resources/spinner.gif +0 -0
- data/lib/lib/NAnt/CollectionGen.dll +0 -0
- data/lib/lib/NAnt/Interop.MsmMergeTypeLib.dll +0 -0
- data/lib/lib/NAnt/Interop.StarTeam.dll +0 -0
- data/lib/lib/NAnt/Interop.WindowsInstaller.dll +0 -0
- data/lib/lib/NAnt/MSITaskErrors.mst +0 -0
- data/lib/lib/NAnt/MSITaskTemplate.msi +0 -0
- data/lib/lib/NAnt/MSMTaskErrors.mst +0 -0
- data/lib/lib/NAnt/MSMTaskTemplate.msm +0 -0
- data/lib/lib/NAnt/MbUnit.Framework.dll +0 -0
- data/lib/lib/NAnt/MbUnit.Tasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.CompressionTasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.Contrib.Tasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.Core.dll +0 -0
- data/lib/lib/NAnt/NAnt.DotNetTasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.MSNetTasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.NUnit.dll +0 -0
- data/lib/lib/NAnt/NAnt.NUnit1Tasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.NUnit2Tasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.SourceControlTasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.VSNetTasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.VisualCppTasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.Win32Tasks.dll +0 -0
- data/lib/lib/NAnt/NAnt.exe +0 -0
- data/lib/lib/NAnt/NAnt.exe.config +2126 -0
- data/lib/lib/NAnt/NCoverExplorer.NAntTasks.dll +0 -0
- data/lib/lib/NAnt/NDepend.Build.NAntTasks.dll +0 -0
- data/lib/lib/NAnt/NDoc.Documenter.NAnt.dll +0 -0
- data/lib/lib/NAnt/QuickGraph.Algorithms.dll +0 -0
- data/lib/lib/NAnt/QuickGraph.dll +0 -0
- data/lib/lib/NAnt/SLiNgshoT.Core.dll +0 -0
- data/lib/lib/NAnt/SLiNgshoT.exe +0 -0
- data/lib/lib/NAnt/SourceSafe.Interop.dll +0 -0
- data/lib/lib/NAnt/ThoughtWorks.CruiseControl.MSBuild.dll +0 -0
- data/lib/lib/NAnt/extensions/common/2.0/NAnt.MSBuild.dll +0 -0
- data/lib/lib/NAnt/extensions/common/2.0/NAnt.MSBuild.xml +36 -0
- data/lib/lib/NAnt/lib/common/1.1/nunit-console-runner.dll +0 -0
- data/lib/lib/NAnt/lib/common/1.1/nunit-console.exe +0 -0
- data/lib/lib/NAnt/lib/common/1.1/nunit.core.dll +0 -0
- data/lib/lib/NAnt/lib/common/1.1/nunit.framework.dll +0 -0
- data/lib/lib/NAnt/lib/common/1.1/nunit.util.dll +0 -0
- data/lib/lib/NAnt/lib/common/2.0/nunit-console-runner.dll +0 -0
- data/lib/lib/NAnt/lib/common/2.0/nunit-console.exe +0 -0
- data/lib/lib/NAnt/lib/common/2.0/nunit.core.dll +0 -0
- data/lib/lib/NAnt/lib/common/2.0/nunit.framework.dll +0 -0
- data/lib/lib/NAnt/lib/common/2.0/nunit.util.dll +0 -0
- data/lib/lib/NAnt/lib/common/neutral/ICSharpCode.SharpCvsLib.Console.dll +0 -0
- data/lib/lib/NAnt/lib/common/neutral/ICSharpCode.SharpCvsLib.dll +0 -0
- data/lib/lib/NAnt/lib/common/neutral/ICSharpCode.SharpZipLib.dll +0 -0
- data/lib/lib/NAnt/lib/common/neutral/NDoc.Core.dll +0 -0
- data/lib/lib/NAnt/lib/common/neutral/NDoc.Documenter.Msdn.dll +0 -0
- data/lib/lib/NAnt/lib/common/neutral/NDoc.ExtendedUI.dll +0 -0
- data/lib/lib/NAnt/lib/common/neutral/NUnitCore.dll +0 -0
- data/lib/lib/NAnt/lib/mono/1.0/NDoc.Core.dll +0 -0
- data/lib/lib/NAnt/lib/mono/1.0/NDoc.Documenter.Msdn.dll +0 -0
- data/lib/lib/NAnt/lib/mono/1.0/NDoc.ExtendedUI.dll +0 -0
- data/lib/lib/NAnt/lib/mono/1.0/nunit.core.dll +0 -0
- data/lib/lib/NAnt/lib/mono/1.0/nunit.framework.dll +0 -0
- data/lib/lib/NAnt/lib/mono/1.0/nunit.util.dll +0 -0
- data/lib/lib/NAnt/lib/mono/2.0/NDoc.Core.dll +0 -0
- data/lib/lib/NAnt/lib/mono/2.0/NDoc.Documenter.Msdn.dll +0 -0
- data/lib/lib/NAnt/lib/mono/2.0/NDoc.ExtendedUI.dll +0 -0
- data/lib/lib/NAnt/lib/mono/2.0/nunit.core.dll +0 -0
- data/lib/lib/NAnt/lib/mono/2.0/nunit.framework.dll +0 -0
- data/lib/lib/NAnt/lib/mono/2.0/nunit.util.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.0/NDoc.Core.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.0/NDoc.Documenter.Msdn.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.0/NDoc.ExtendedUI.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.0/nunit-console-runner.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.0/nunit-console.exe +0 -0
- data/lib/lib/NAnt/lib/net/1.0/nunit.core.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.0/nunit.framework.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.0/nunit.util.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.1/NDoc.Core.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.1/NDoc.Documenter.Msdn.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.1/NDoc.ExtendedUI.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.1/nunit.core.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.1/nunit.framework.dll +0 -0
- data/lib/lib/NAnt/lib/net/1.1/nunit.util.dll +0 -0
- data/lib/lib/NAnt/lib/net/2.0/NDoc.Core.dll +0 -0
- data/lib/lib/NAnt/lib/net/2.0/NDoc.Documenter.Msdn.dll +0 -0
- data/lib/lib/NAnt/lib/net/2.0/NDoc.ExtendedUI.dll +0 -0
- data/lib/lib/NAnt/lib/net/2.0/nunit.core.dll +0 -0
- data/lib/lib/NAnt/lib/net/2.0/nunit.framework.dll +0 -0
- data/lib/lib/NAnt/lib/net/2.0/nunit.util.dll +0 -0
- data/lib/lib/NAnt/log4net.dll +0 -0
- data/lib/lib/NAnt/scvs.exe +0 -0
- data/lib/lib/NCover/ActiproEULA.html +287 -0
- data/lib/lib/NCover/ActiproSoftware.Shared.Net11.dll +0 -0
- data/lib/lib/NCover/ActiproSoftware.SyntaxEditor.Net11.dll +0 -0
- data/lib/lib/NCover/ActiproSoftware.WinUICore.Net11.dll +0 -0
- data/lib/lib/NCover/CommandBars.dll +0 -0
- data/lib/lib/NCover/ConsoleConfig.xsd +123 -0
- data/lib/lib/NCover/ConsoleExample.config +94 -0
- data/lib/lib/NCover/CoverLib.dll +0 -0
- data/lib/lib/NCover/Coverage.xsl +339 -0
- data/lib/lib/NCover/CoverageReport.xsl +468 -0
- data/lib/lib/NCover/ICSharpCode.TextEditor.dll +0 -0
- data/lib/lib/NCover/LicencePersonal.rtf +334 -0
- data/lib/lib/NCover/MSVCP80.dll +0 -0
- data/lib/lib/NCover/MSVCR80.dll +0 -0
- data/lib/lib/NCover/Microsoft.VC80.CRT.manifest +8 -0
- data/lib/lib/NCover/NCover.Console.exe +0 -0
- data/lib/lib/NCover/NCover.Console.exe.config +6 -0
- data/lib/lib/NCover/NCover.Framework.dll +0 -0
- data/lib/lib/NCover/NCoverExplorer.Console.exe +0 -0
- data/lib/lib/NCover/NCoverExplorer.Core.dll +0 -0
- data/lib/lib/NCover/NCoverExplorer.NCoverRunner.dll +0 -0
- data/lib/lib/NCover/NCoverExplorer.WinForms.dll +0 -0
- data/lib/lib/NCover/NCoverExplorer.exe +0 -0
- data/lib/lib/NCover/NCoverExplorer.exe.config +8 -0
- data/lib/lib/NCover/NCoverExplorerFAQ.html +303 -0
- data/lib/lib/NCover/NCoverExplorerReleaseNotes.html +874 -0
- data/lib/lib/NCover/NCoverFAQ.html +429 -0
- data/lib/lib/NCover/VC80CRT.MAN +15 -0
- data/lib/lib/NCover/license.txt +299 -0
- data/lib/lib/NUnit/NUnitTests.config +84 -0
- data/lib/lib/NUnit/NUnitTests.nunit +14 -0
- data/lib/lib/NUnit/agent.conf +4 -0
- data/lib/lib/NUnit/agent.log.conf +18 -0
- data/lib/lib/NUnit/framework/nunit.framework.dll +0 -0
- data/lib/lib/NUnit/framework/nunit.framework.xml +10113 -0
- data/lib/lib/NUnit/framework/nunit.mocks.dll +0 -0
- data/lib/lib/NUnit/framework/pnunit.framework.dll +0 -0
- data/lib/lib/NUnit/launcher.log.conf +18 -0
- data/lib/lib/NUnit/lib/Failure.png +0 -0
- data/lib/lib/NUnit/lib/Ignored.png +0 -0
- data/lib/lib/NUnit/lib/Inconclusive.png +0 -0
- data/lib/lib/NUnit/lib/Skipped.png +0 -0
- data/lib/lib/NUnit/lib/Success.png +0 -0
- data/lib/lib/NUnit/lib/fit.dll +0 -0
- data/lib/lib/NUnit/lib/log4net.dll +0 -0
- data/lib/lib/NUnit/lib/nunit-console-runner.dll +0 -0
- data/lib/lib/NUnit/lib/nunit-gui-runner.dll +0 -0
- data/lib/lib/NUnit/lib/nunit.core.dll +0 -0
- data/lib/lib/NUnit/lib/nunit.core.interfaces.dll +0 -0
- data/lib/lib/NUnit/lib/nunit.fixtures.dll +0 -0
- data/lib/lib/NUnit/lib/nunit.uiexception.dll +0 -0
- data/lib/lib/NUnit/lib/nunit.uikit.dll +0 -0
- data/lib/lib/NUnit/lib/nunit.util.dll +0 -0
- data/lib/lib/NUnit/nunit-agent-x86.exe +0 -0
- data/lib/lib/NUnit/nunit-agent-x86.exe.config +76 -0
- data/lib/lib/NUnit/nunit-agent.exe +0 -0
- data/lib/lib/NUnit/nunit-agent.exe.config +76 -0
- data/lib/lib/NUnit/nunit-console-x86.exe +0 -0
- data/lib/lib/NUnit/nunit-console-x86.exe.config +76 -0
- data/lib/lib/NUnit/nunit-console.exe +0 -0
- data/lib/lib/NUnit/nunit-console.exe.config +76 -0
- data/lib/lib/NUnit/nunit-x86.exe +0 -0
- data/lib/lib/NUnit/nunit-x86.exe.config +91 -0
- data/lib/lib/NUnit/nunit.exe +0 -0
- data/lib/lib/NUnit/nunit.exe.config +91 -0
- data/lib/lib/NUnit/nunit.framework.dll +0 -0
- data/lib/lib/NUnit/pnunit-agent.exe +0 -0
- data/lib/lib/NUnit/pnunit-agent.exe.config +77 -0
- data/lib/lib/NUnit/pnunit-launcher.exe +0 -0
- data/lib/lib/NUnit/pnunit-launcher.exe.config +77 -0
- data/lib/lib/NUnit/pnunit.framework.dll +0 -0
- data/lib/lib/NUnit/pnunit.tests.dll +0 -0
- data/lib/lib/NUnit/runpnunit.bat +2 -0
- data/lib/lib/NUnit/test.conf +24 -0
- data/lib/lib/NUnit/tests/loadtest-assembly.dll +0 -0
- data/lib/lib/NUnit/tests/mock-assembly.dll +0 -0
- data/lib/lib/NUnit/tests/nonamespace-assembly.dll +0 -0
- data/lib/lib/NUnit/tests/nunit-console.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit-gui.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.core.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.fixtures.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.framework.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.framework.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.mocks.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.uiexception.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.uikit.tests.dll +0 -0
- data/lib/lib/NUnit/tests/nunit.util.tests.dll +0 -0
- data/lib/lib/NUnit/tests/test-assembly.dll +0 -0
- data/lib/lib/NUnit/tests/test-utilities.dll +0 -0
- data/lib/lib/NUnit/tests/timing-tests.dll +0 -0
- data/lib/open.bat +10 -0
- data/lib/settings/LOCAL.settings +29 -0
- data/lib/settings/SettingsFileReadMe.txt +2 -0
- data/lib/settings/UppercuT.config +73 -0
- data/lib/test.bat +38 -0
- data/lib/zip.bat +23 -0
- metadata +328 -0
data/lib/NDepend.xml
ADDED
@@ -0,0 +1,251 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
2
|
+
<NDepend AppName="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" Platform="DotNet">
|
3
|
+
<OutputDir KeepHistoric="True" KeepXmlFiles="True" ViewReport="True">.\build_output\build_artifacts\ndepend</OutputDir>
|
4
|
+
<Assemblies>
|
5
|
+
<Name>PROJECTASSEMBLIESGOHERE</Name>
|
6
|
+
</Assemblies>
|
7
|
+
<FrameworkAssemblies>
|
8
|
+
<Name>Castle.Core</Name>
|
9
|
+
<Name>Castle.Components.Validator</Name>
|
10
|
+
<Name>Castle.DynamicProxy2</Name>
|
11
|
+
<Name>Castle.DynamicProxy</Name>
|
12
|
+
<Name>Castle.Facilities.NHibernateIntegration</Name>
|
13
|
+
<Name>Castle.MicroKernel</Name>
|
14
|
+
<Name>Castle.Windsor</Name>
|
15
|
+
<Name>FileHelpers</Name>
|
16
|
+
<Name>Iesi.Collections</Name>
|
17
|
+
<Name>log4net</Name>
|
18
|
+
<Name>MassTransit.ServiceBus</Name>
|
19
|
+
<Name>MassTransit.ServiceBus.MSMQ</Name>
|
20
|
+
<Name>MassTransit.SubscriptionStorage</Name>
|
21
|
+
<Name>MassTransit.WindsorIntegration</Name>
|
22
|
+
<Name>Microsoft.ReportViewer.Common</Name>
|
23
|
+
<Name>Microsoft.ReportViewer.ProcessingObjectModel</Name>
|
24
|
+
<Name>Microsoft.ReportViewer.WebForms</Name>
|
25
|
+
<Name>Microsoft.SqlServer.BatchParser</Name>
|
26
|
+
<Name>Microsoft.SqlServer.Replication</Name>
|
27
|
+
<Name>MbUnit.Framework</Name>
|
28
|
+
<Name>mscorlib</Name>
|
29
|
+
<Name>NHibernate</Name>
|
30
|
+
<Name>Rhino.Mocks</Name>
|
31
|
+
<Name>System</Name>
|
32
|
+
<Name>System.configuration</Name>
|
33
|
+
<Name>System.configuration.Install</Name>
|
34
|
+
<Name>System.Core</Name>
|
35
|
+
<Name>System.Data</Name>
|
36
|
+
<Name>System.Deployment</Name>
|
37
|
+
<Name>System.Drawing</Name>
|
38
|
+
<Name>System.EnterpriseServices</Name>
|
39
|
+
<Name>System.ServiceModel</Name>
|
40
|
+
<Name>System.ServiceProcess</Name>
|
41
|
+
<Name>System.Web</Name>
|
42
|
+
<Name>System.Web.Mobile</Name>
|
43
|
+
<Name>System.Web.Services</Name>
|
44
|
+
<Name>System.Xml</Name>
|
45
|
+
</FrameworkAssemblies>
|
46
|
+
<Dirs>
|
47
|
+
<Dir>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727</Dir>
|
48
|
+
<Dir>C:\WINDOWS\Microsoft.NET\Framework\v3.0</Dir>
|
49
|
+
<Dir>C:\WINDOWS\Microsoft.NET\Framework\v3.5</Dir>
|
50
|
+
<Dir>.\build_output</Dir>
|
51
|
+
</Dirs>
|
52
|
+
<Report XslPath="">
|
53
|
+
<Section Enabled="True">Application Metrics</Section>
|
54
|
+
<Section Enabled="True">Assemblies Metrics</Section>
|
55
|
+
<Section Enabled="True">VisualNDepend View</Section>
|
56
|
+
<Section Enabled="True">Assemblies Abstractness vs. Instability</Section>
|
57
|
+
<Section Enabled="True">Assemblies Dependencies</Section>
|
58
|
+
<Section Enabled="True">Assemblies Dependencies Diagram</Section>
|
59
|
+
<Section Enabled="True">Assemblies build order</Section>
|
60
|
+
<Section Enabled="True">NDepend information and warnings</Section>
|
61
|
+
<Section Enabled="True">CQL Queries and Constraints</Section>
|
62
|
+
<Section Enabled="True">Types Metrics</Section>
|
63
|
+
<Section Enabled="False">Types Dependencies</Section>
|
64
|
+
</Report>
|
65
|
+
<BuildComparisonSetting ProjectMode="DontCompare" BuildMode="MostRecentBuildAvailable" ProjectFileToCompareWith="" BuildFileToCompareWith="" NDaysAgo="1" />
|
66
|
+
<CoverageFiles UncoverableAttribute="" />
|
67
|
+
<SourceFileRebasing FromPath="" ToPath="" />
|
68
|
+
<CQLQueries>
|
69
|
+
<CQLGroup Name="Code Quality" Active="True">
|
70
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Quick summary of methods to refactor</Name>\r\n\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS /*OUT OF "YourGeneratedCode" */ WHERE \r\n\r\n // Metrics' definitions\r\n ( NbLinesOfCode > 30 OR // http://www.ndepend.com/Metrics.aspx#NbLinesOfCode\r\n NbILInstructions > 200 OR // http://www.ndepend.com/Metrics.aspx#NbILInstructions\r\n CyclomaticComplexity > 20 OR // http://www.ndepend.com/Metrics.aspx#CC\r\n ILCyclomaticComplexity > 50 OR // http://www.ndepend.com/Metrics.aspx#ILCC\r\n ILNestingDepth > 4 OR // http://www.ndepend.com/Metrics.aspx#ILNestingDepth\r\n NbParameters > 5 OR // http://www.ndepend.com/Metrics.aspx#NbParameters\r\n NbVariables > 8 OR // http://www.ndepend.com/Metrics.aspx#NbVariables\r\n NbOverloads > 6 ) // http://www.ndepend.com/Metrics.aspx#NbOverloads\r\n AND \r\n\r\n // Here are some ways to avoid taking account of generated methods.\r\n !( NameIs "InitializeComponent()" OR\r\n // NDepend.CQL.GeneratedAttribute is defined in the redistributable assembly $NDependInstallDir$\Lib\NDepend.CQL.dll\r\n // You can define your own attribute to mark "Generated".\r\n HasAttribute "OPTIONAL:NDepend.CQL.GeneratedAttribute") </CQLQuery>
|
71
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods too big (NbLinesOfCode)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbLinesOfCode > 30 ORDER BY NbLinesOfCode DESC\r\n// METHODS WHERE NbLinesOfCode > 30 are extremely complex and \r\n// should be split in smaller methods \r\n// (except if they are automatically generated by a tool).\r\n// See the definition of the NbLinesOfCode metric here http://www.ndepend.com/Metrics.aspx#NbLinesOfCode</CQLQuery>
|
72
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods too big (NbILInstructions)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbILInstructions > 200 ORDER BY NbILInstructions DESC\r\n// METHODS WHERE NbILInstructions > 200 are extremely complex and \r\n// should be split in smaller methods \r\n// (except if they are automatically generated by a tool).\r\n// See the definition of the NbILInstructions metric here http://www.ndepend.com/Metrics.aspx#NbILInstructions</CQLQuery>
|
73
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods too complex (CyclomaticComplexity)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE CyclomaticComplexity > 20 ORDER BY CyclomaticComplexity DESC\r\n// METHODS WHERE CyclomaticComplexity > 15 are hard to understand and maintain.\r\n// METHODS WHERE CyclomaticComplexity > 30 are extremely complex and should be split \r\n// in smaller methods (except if they are automatically generated by a tool).\r\n// See the definition of the CyclomaticComplexity metric here http://www.ndepend.com/Metrics.aspx#CC</CQLQuery>
|
74
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods too complex (ILCyclomaticComplexity)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE ILCyclomaticComplexity > 40 ORDER BY ILCyclomaticComplexity DESC\r\n// METHODS WHERE ILCyclomaticComplexity > 20 are hard to understand and maintain.\r\n// METHODS WHERE ILCyclomaticComplexity > 40 are extremely complex and should be split \r\n// in smaller methods (except if they are automatically generated by a tool).\r\n// See the definition of the ILCyclomaticComplexity metric here http://www.ndepend.com/Metrics.aspx#ILCC</CQLQuery>
|
75
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods too complex (ILNestingDepth)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE ILNestingDepth > 4 ORDER BY ILNestingDepth DESC\r\n// METHODS WHERE ILNestingDepth > 4 are hard to understand and maintain. \r\n// METHODS WHERE ILNestingDepth > 8 is higher than 8 are extremely complex and should be split in smaller methods \r\n// (except if they are automatically generated by a tool). \r\n// See the definition of the NbILInstructions metric here http://www.NDepend.com/Metrics.aspx#ILNestingDepth</CQLQuery>
|
76
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods with too many parameters (NbParameters)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbParameters > 5 ORDER BY NbParameters DESC\r\n// METHODS WHERE NbParameters > 5 might be painful to call and might degrade performance. \r\n// You should prefer using additional properties/fields to the declaring type to handle \r\n// numerous states. Another alternative is to provide a class or structure dedicated to \r\n// handle arguments passing (for example see the class System.Diagnostics.ProcessStartInfo \r\n// and the method System.Diagnostics.Process.Start(ProcessStartInfo))\r\n// See the definition of the NbParameters metric here http://www.ndepend.com/Metrics.aspx#NbParameters</CQLQuery>
|
77
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods with too many local variables (NbVariables)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbVariables > 15 ORDER BY NbVariables DESC\r\n// METHODS WHERE NbVariables > 8 are hard to understand and maintain.\r\n// METHODS WHERE NbVariables > 15 are extremely complex and should be split in \r\n// smaller methods (except if they are automatically generated by a tool).\r\n// See the definition of the Nbvariables metric here http://www.ndepend.com/Metrics.aspx#Nbvariables</CQLQuery>
|
78
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods with too many overloads (NbOverloads)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE NbOverloads > 6 ORDER BY NbOverloads DESC\r\n// METHODS WHERE NbParameters > 6 might be a problem to maintain and provoke higher coupling than necessary. \r\n// This might also reveal a potential misused of the C# and VB.NET language that since C#3 and VB9 support \r\n// object initialization. This feature helps reducing the number of constructors of a class.\r\n// See the definition of the NbOverloads metric here http://www.ndepend.com/Metrics.aspx#NbOverloads</CQLQuery>
|
79
|
+
<CQLGroup Name="Type Metrics" Active="True">
|
80
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Types with too many methods</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE NbMethods > 20 ORDER BY NbMethods DESC\r\n// TYPES WHERE NbMethods > 20 might be hard to understand and maintain \r\n// but there might be cases where it is relevant to have a high value for NbMethods. \r\n// For example, the System.Windows.Forms.DataGridView standard class has more than 1000 methods.\r\n// See the definition of the NbMethods metric here http://www.ndepend.com/Metrics.aspx#NbMethods</CQLQuery>
|
81
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Types with too many fields</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE NbFields > 20 AND !IsEnumeration ORDER BY NbFields DESC\r\n// TYPES WHERE NbFields > 20 AND !IsEnumeration might be hard to understand and maintain \r\n// but there might be cases where it is relevant to have a high value for NbFields. \r\n// For example, the System.Windows.Forms.Control standard class has more than 200 fields. \r\n// The value of the metric NbFields might be a better indicator of complex type.\r\n// See the definition of the NbFields metric here http://www.ndepend.com/Metrics.aspx#NbFields</CQLQuery>
|
82
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Types with poor cohesion (LCOM)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE LCOM > 0.8 AND NbFields > 10 AND NbMethods >10 ORDER BY LCOM DESC\r\n// TYPES WHERE LCOM > 0.8 AND NbFields > 10 AND NbMethods >10 might be problematic. \r\n// However, it is very hard to avoid such non-cohesive types. The LCOMHS metric\r\n// is often considered as more efficient to detect non-cohesive types.\r\n// See the definition of the LCOM metric here http://www.ndepend.com/Metrics.aspx#LCOM</CQLQuery>
|
83
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Types with poor cohesion (LCOMHS)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE LCOMHS > 0.95 AND NbFields > 10 AND NbMethods >10 ORDER BY LCOMHS DESC\r\n// TYPES WHERE LCOMHS > 1.0 AND NbFields > 10 AND NbMethods >10 should be avoided. \r\n// Note that this constraint is stronger than the constraint \r\n// TYPES WHERE LCOM > 0.8 AND NbFields > 10 AND NbMethods >10. \r\n// See the definition of the LCOMHS metric here http://www.ndepend.com/Metrics.aspx#LCOMHS</CQLQuery>
|
84
|
+
</CQLGroup>
|
85
|
+
</CQLGroup>
|
86
|
+
<CQLGroup Name="Design" Active="True">
|
87
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Assembly should not contain namespaces dependency cycles</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 ASSEMBLIES WHERE ContainsNamespaceDependencyCycle\r\n// Dependency cycles between namespaces must be avoided \r\n// in order to have a levelized and comprehensive design.\r\n// More info available on the screencast 'Reduce the complexity' http://s3.amazonaws.com/NDependOnlineDemos/NDependReducingComplexity_viewlet_swf.html\r\n// You can also read this article http://www.theserverside.net/tt/articles/showarticle.tss?id=ControllingDependencies</CQLQuery>
|
88
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Type should not have too many responsabilities (Efferent Coupling)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE TypeCe > 50 ORDER BY TypeCe DESC \r\n// The Efferent Coupling (TypeCe) for a particular type is the number of types \r\n// it directly depends on. Notice that types declared in tier assemblies are taken into account. \r\n\r\n// Types that depends on too many others type (more than 50) are complex and have\r\n// more than one responsability. They are good candidate for refactoring.\r\n\r\n// More information available in this article:\r\n// http://codebetter.com/blogs/patricksmacchia/archive/2008/02/15/code-metrics-on-coupling-dead-code-design-flaws-and-re-engineering.aspx\r\n\r\n</CQLQuery>
|
89
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Avoid namespaces with few types</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 NAMESPACES WHERE NbTypes < 5 ORDER BY NbTypes ASC \r\n\r\n// Make sure that there is a logical organization to each of your namespaces, \r\n// and that there is a valid reason for putting types in a sparsely populated \r\n// namespace. Namespaces should contain types that are used together in most \r\n// scenarios. When their applications are mutually exclusive, types should be \r\n// located in separate namespaces</CQLQuery>
|
90
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Declare types in namespaces</Name>\r\nWARN IF Count > 0 IN SELECT NAMESPACES WHERE NameIs "" AND !IsInFrameworkAssembly \r\n\r\n// Types are declared within namespaces to prevent name collisions, and as a way of organizing related types \r\n// in an object hierarchy. Types outside any named namespace are in a global namespace that cannot be referenced in code.\r\n// If an anonymous namespace can be found, it means that it contains types outside of namespaces.</CQLQuery>
|
91
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Assemblies with poor cohesion (RelationalCohesion)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 ASSEMBLIES WHERE RelationalCohesion < 1.5 OR RelationalCohesion > 4.0\r\n\r\n// As classes inside an assembly should be strongly related, \r\n// the cohesion should be high. On the other hand, a value which is too high may \r\n// indicate over-coupling. A good range for RelationalCohesion is 1.5 to 4.0.\r\n// See the definition of the RelationalCohesion metric here http://www.ndepend.com/Metrics.aspx#RelationalCohesion</CQLQuery>
|
92
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Assemblies that don't satisfy the Abstractness/Instability principle</Name>\r\n\r\nWARN IF Percentage > 15 IN SELECT ASSEMBLIES WHERE NormDistFromMainSeq > 0.7 ORDER BY NormDistFromMainSeq DESC\r\n\r\n// See the definition of the NormDistFromMainSeq metric here http://www.ndepend.com/Metrics.aspx#DitFromMainSeq</CQLQuery>
|
93
|
+
<CQLGroup Name="Performance" Active="True">
|
94
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Instances size shouldn't be too big (SizeOfInst)</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE SizeOfInst > 64 ORDER BY SizeOfInst DESC\r\n// TYPES WHERE SizeOfInst > 64 might degrade performance (depending on the number of \r\n// instances created at runtime) and might be hard to maintain. \r\n// However it is not a rule since sometime there is no alternative \r\n// (the size of instances of the System.Net.NetworkInformation.SystemIcmpV6Statistics \r\n// standard class is 2064 bytes).\r\n// See the definition of the SizeOfInst metric here http://www.ndepend.com/Metrics.aspx#SizeOfInst</CQLQuery>
|
95
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Boxing/unboxing should be avoided (Method)</Name>\r\nWARN IF Percentage > 5 IN SELECT METHODS WHERE IsUsingBoxing OR IsUsingUnboxing \r\n// Thanks to generics, boxing and unboxing should be rare.</CQLQuery>
|
96
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Boxing/unboxing should be avoided (Type)</Name>\r\nWARN IF Percentage > 5 IN SELECT TYPES WHERE IsUsingBoxing OR IsUsingUnboxing \r\n// Thanks to generics, boxing and unboxing should be rare.</CQLQuery>
|
97
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Attribute classes should be sealed</Name>\r\nWARN IF Count > 0 IN SELECT TYPES WHERE IsAttributeClass \r\nAND !IsSealed AND !IsAbstract AND IsPublic AND !IsInFrameworkAssembly \r\n\r\n// The .NET Framework class library provides methods for retrieving custom attributes. \r\n// By default, these methods search the attribute inheritance hierarchy; for example \r\n// System.Attribute.GetCustomAttribute searches for the specified attribute type, or \r\n// any attribute type that extends the specified attribute type. Sealing the attribute \r\n// eliminates the search through the inheritance hierarchy, and can improve performance.</CQLQuery>
|
98
|
+
</CQLGroup>
|
99
|
+
</CQLGroup>
|
100
|
+
<CQLGroup Name="Unused Code / Dead Code" Active="True">
|
101
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Potentially unused methods</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE \r\n MethodCa == 0 AND // Ca=0 -> No Afferent Coupling -> The method is not used in the context of this application.\r\n !IsPublic AND // Public methods might be used by client applications of your assemblies.\r\n !IsEntryPoint AND // Main() method is not used by-design.\r\n !IsExplicitInterfaceImpl AND // The IL code never explicitely calls explicit interface methods implementation.\r\n !IsClassConstructor AND // The IL code never explicitely calls class constructors.\r\n !IsFinalizer // The IL code never explicitely calls finalizers.\r\n</CQLQuery>
|
102
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Potentially unused fields</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE \r\n FieldCa == 0 AND // Ca=0 -> No Afferent Coupling -> The field is not used in the context of this application.\r\n !IsPublic AND // Although not recommended, public fields might be used by client applications of your assemblies.\r\n !IsLiteral AND // The IL code never explicitely uses literal fields.\r\n !IsEnumValue AND // The IL code never explicitely uses enumeration value.\r\n !NameIs "value__" // Field named 'value__' are relative to enumerations and the IL code never explicitely uses them.</CQLQuery>
|
103
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Potentially unused types</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE \r\n TypeCa == 0 AND // Ca=0 -> No Afferent Coupling -> The type is not used in the context of this application.\r\n !IsPublic AND // Public types might be used by client applications of your assemblies.\r\n !NameIs "Program" // Generally, types named Program contain a Main() entry-point method and this condition avoid to consider such type as unused code.\r\n</CQLQuery>
|
104
|
+
</CQLGroup>
|
105
|
+
<CQLGroup Name="Encapsulation" Active="True">
|
106
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Fields should be declared as private</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE \r\n !IsPrivate AND \r\n // These conditions filter cases where fields doesn't represent state that should be encapsulated. \r\n !IsInFrameworkAssembly AND \r\n !IsGeneratedByCompiler AND \r\n !IsSpecialName AND \r\n !IsInitOnly AND \r\n !IsLiteral AND \r\n !IsEnumValue</CQLQuery>
|
107
|
+
<CQLGroup Name="Fields Optimal Encapsulation" Active="True">
|
108
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Fields that could be declared as 'private' in C#, 'Private' in VB.NET</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE CouldBePrivate</CQLQuery>
|
109
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Fields that should be declared as 'public' in C#, 'Public' in VB.NET</Name>\r\nSELECT FIELDS WHERE ShouldBePublic \r\n// The keyword 'ShouldBePublic' shows code elements declared as 'internal\Friend' that are used outside of their assembly\r\n// thanks to the Attribute System.Runtime.CompilerServices.InternalsVisibleTo</CQLQuery>
|
110
|
+
</CQLGroup>
|
111
|
+
</CQLGroup>
|
112
|
+
<CQLGroup Name="Diff / Changes / Evolution" Active="True">
|
113
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>API Breaking Changes: Methods</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS\r\nWHERE IsPublic AND (VisibilityWasChanged OR WasRemoved)\r\n\r\n// This constraint warns if a public method is not public anymore or if it has been removed.\r\n// This can break the code of your clients.\r\n// More information on breaking changes here: \r\n// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/20/avoid-api-breaking-changes.aspx\r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in VisualNDepend throught the menu: Start Page -> Compare 2 versions of a code base\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Analysis Comparison\r\n\r\n</CQLQuery>
|
114
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>API Breaking Changes: Types</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES\r\nWHERE IsPublic AND (VisibilityWasChanged OR WasRemoved)\r\n\r\n// This constraint warns if a public type is not public anymore or if it has been removed.\r\n// This can break the code of your clients.\r\n// More information on breaking changes here: \r\n// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/20/avoid-api-breaking-changes.aspx\r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in VisualNDepend throught the menu: Start Page -> Compare 2 versions of a code base\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Analysis Comparison\r\n\r\n\r\n</CQLQuery>
|
115
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>API Breaking Changes: Interfaces</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES\r\nWHERE IsInterface AND IsPublic AND (WasChanged AND !CommentsWereChanged)\r\n\r\n// This constraint warns if a public interface has been changed, but not because of comment change.\r\n// This can break the code of your clients that implements such interface.\r\n// More information on breaking changes here: \r\n// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/20/avoid-api-breaking-changes.aspx\r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in VisualNDepend throught the menu: Start Page -> Compare 2 versions of a code base\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Analysis Comparison</CQLQuery>
|
116
|
+
<CQLGroup Name="Changes Summary" Active="False">
|
117
|
+
<CQLGroup Name="Methods" Active="False">
|
118
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Methods added</Name>\r\nSELECT METHODS WHERE WasAdded\r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
119
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Methods removed</Name>\r\nSELECT METHODS WHERE WasRemoved \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
120
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Methods where code was changed</Name>\r\nSELECT METHODS WHERE CodeWasChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
121
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Methods where comments were changed</Name>\r\nSELECT METHODS WHERE CommentsWereChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
122
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Methods where visibility was changed</Name>\r\nSELECT METHODS WHERE VisibilityWasChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
123
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Methods that became obsolete</Name>\r\nSELECT METHODS WHERE BecameObsolete \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
124
|
+
</CQLGroup>
|
125
|
+
<CQLGroup Name="Fields" Active="False">
|
126
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Fields added</Name>\r\nSELECT FIELDS WHERE WasAdded\r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
127
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Fields removed</Name>\r\nSELECT FIELDS WHERE WasRemoved \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
128
|
+
</CQLGroup>
|
129
|
+
<CQLGroup Name="Types" Active="False">
|
130
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Types added</Name>\r\nSELECT TYPES WHERE WasAdded\r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
131
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Types removed</Name>\r\nSELECT TYPES WHERE WasRemoved \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
132
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Types where code was changed</Name>\r\nSELECT TYPES WHERE CodeWasChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
133
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Types where comments were changed</Name>\r\nSELECT TYPES WHERE CommentsWereChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
134
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Types where visibility was changed</Name>\r\nSELECT TYPES WHERE VisibilityWasChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
135
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tyoes that became obsolete</Name>\r\nSELECT TYPES WHERE BecameObsolete \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
136
|
+
</CQLGroup>
|
137
|
+
<CQLGroup Name="Namespaces" Active="False">
|
138
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Namespaces added</Name>\r\nSELECT NAMESPACES WHERE WasAdded\r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
139
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Namespaces removed</Name>\r\nSELECT NAMESPACES WHERE WasRemoved \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
140
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Namespaces where code was changed</Name>\r\nSELECT NAMESPACES WHERE CodeWasChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
141
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Namespaces where comments were changed</Name>\r\nSELECT NAMESPACES WHERE CommentsWereChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
142
|
+
</CQLGroup>
|
143
|
+
<CQLGroup Name="Assemblies" Active="False">
|
144
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Assemblies added</Name>\r\nSELECT ASSEMBLIES WHERE WasAdded\r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
145
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Assemblies removed</Name>\r\nSELECT ASSEMBLIES WHERE WasRemoved \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
146
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Assemblies where code was changed</Name>\r\nSELECT ASSEMBLIES WHERE CodeWasChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
147
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Assemblies where comments were changed</Name>\r\nSELECT ASSEMBLIES WHERE CommentsWereChanged \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
148
|
+
</CQLGroup>
|
149
|
+
<CQLGroup Name="Tier Code Usage" Active="False">
|
150
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Methods that were not used and that are now used</Name>\r\nSELECT METHODS WHERE IsUsedRecently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
151
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Methods that were used and that are not used anymore</Name>\r\nSELECT METHODS WHERE IsNotUsedAnymore \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
152
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Types that were not used and that are now used</Name>\r\nSELECT TYPES WHERE IsUsedRecently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
153
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Types that were used and that are not used anymore</Name>\r\nSELECT TYPES WHERE IsNotUsedAnymore \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
154
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Types where usage changed</Name>\r\nSELECT TYPES WHERE IsUsedDifferently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
155
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Namespaces that were not used and that are now used</Name>\r\nSELECT NAMESPACES WHERE IsUsedRecently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
156
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Namespaces that were used and that are not used anymore</Name>\r\nSELECT NAMESPACES WHERE IsNotUsedAnymore \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
157
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Namespaces where usage changed</Name>\r\nSELECT NAMESPACES WHERE IsUsedDifferently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
158
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Assemblies that were not used and that are now used</Name>\r\nSELECT ASSEMBLIES WHERE IsUsedRecently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
159
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Assemblies that were used and that are not used anymore</Name>\r\nSELECT ASSEMBLIES WHERE IsNotUsedAnymore \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
160
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Assemblies where usage changed</Name>\r\nSELECT ASSEMBLIES WHERE IsUsedDifferently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
161
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Fields that were not used and that are now used</Name>\r\nSELECT FIELDS WHERE IsUsedRecently \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
162
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Tier Fields that were used and that are not used anymore</Name>\r\nSELECT FIELDS WHERE IsNotUsedAnymore \r\n\r\n// To run this query properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base</CQLQuery>
|
163
|
+
</CQLGroup>
|
164
|
+
</CQLGroup>
|
165
|
+
<CQLGroup Name="Test Coverage of Changes Summary" Active="False">
|
166
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Method changed 100% covered by tests</Name>\r\nSELECT METHODS WHERE PercentageCoverage == 100 AND CodeWasChanged ORDER BY NbLinesOfCode DESC \r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base\r\n\r\n// To run this constraint properly coverage data must be gathered from NCover™ or Visual Studio™ Coverage.\r\n// This can be done in VisualNDepend throught the menu: Coverage -> Import Coverage Files\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Code Coverage\r\n// More information on how to import coverage data here:\r\n// http://www.ndepend.com/Coverage.aspx</CQLQuery>
|
167
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Method added 100% covered by tests</Name>\r\nSELECT METHODS WHERE WasAdded AND PercentageCoverage == 100 ORDER BY NbLinesOfCode DESC \r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base\r\n\r\n// To run this constraint properly coverage data must be gathered from NCover™ or Visual Studio™ Coverage.\r\n// This can be done in VisualNDepend throught the menu: Coverage -> Import Coverage Files\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Code Coverage\r\n// More information on how to import coverage data here:\r\n// http://www.ndepend.com/Coverage.aspx</CQLQuery>
|
168
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Method changed partially covered by tests</Name>\r\nSELECT METHODS WHERE \r\n PercentageCoverage < 100 AND PercentageCoverage > 0 AND\r\n CodeWasChanged \r\n ORDER BY PercentageCoverage DESC , NbLinesOfCodeCovered , NbLinesOfCodeNotCovered \r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base\r\n\r\n// To run this constraint properly coverage data must be gathered from NCover™ or Visual Studio™ Coverage.\r\n// This can be done in VisualNDepend throught the menu: Coverage -> Import Coverage Files\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Code Coverage\r\n// More information on how to import coverage data here:\r\n// http://www.ndepend.com/Coverage.aspx</CQLQuery>
|
169
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Method added partially covered by tests</Name>\r\nSELECT METHODS WHERE \r\n PercentageCoverage < 100 AND PercentageCoverage > 0 AND\r\n WasAdded \r\n ORDER BY PercentageCoverage DESC , NbLinesOfCodeCovered , NbLinesOfCodeNotCovered \r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base\r\n\r\n// To run this constraint properly coverage data must be gathered from NCover™ or Visual Studio™ Coverage.\r\n// This can be done in VisualNDepend throught the menu: Coverage -> Import Coverage Files\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Code Coverage\r\n// More information on how to import coverage data here:\r\n// http://www.ndepend.com/Coverage.aspx</CQLQuery>
|
170
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Method changed not covered at all</Name>\r\nSELECT METHODS WHERE PercentageCoverage == 0 AND CodeWasChanged ORDER BY NbLinesOfCode DESC \r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base\r\n\r\n// To run this constraint properly coverage data must be gathered from NCover™ or Visual Studio™ Coverage.\r\n// This can be done in VisualNDepend throught the menu: Coverage -> Import Coverage Files\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Code Coverage\r\n// More information on how to import coverage data here:\r\n// http://www.ndepend.com/Coverage.aspx</CQLQuery>
|
171
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Method added not covered at all</Name>\r\nSELECT METHODS WHERE PercentageCoverage == 0 AND WasAdded ORDER BY NbLinesOfCode DESC \r\n\r\n// To run this constraint properly 2 analysis must be compared.\r\n// This can be done in throught the menu: Start Page -> Compare 2 versions of a code base\r\n\r\n// To run this constraint properly coverage data must be gathered from NCover™ or Visual Studio™ Coverage.\r\n// This can be done in VisualNDepend throught the menu: Coverage -> Import Coverage Files\r\n// This can be done at analysis time throught the menu: Project Properties -> Analysis -> Code Coverage\r\n// More information on how to import coverage data here:\r\n// http://www.ndepend.com/Coverage.aspx</CQLQuery>
|
172
|
+
</CQLGroup>
|
173
|
+
</CQLGroup>
|
174
|
+
<CQLGroup Name="Purity / Immutability / Side-Effects" Active="True">
|
175
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Fields should be marked as ReadOnly when possible</Name>\r\nWARN IF Count > 0 IN SELECT FIELDS WHERE IsImmutable AND !IsInitOnly\r\n\r\n// A field that matches the condition IsImmutable is a field that is assigned only by constructors of its class.\r\n// For an instance field, this means its value will remain constant throught the lifetime of the object.\r\n// For a static field, this means its value will remain constant throught the lifetime of the program.\r\n// In both cases, such field can safely be marked with the C# readonly keyword (ReadOnly in VB.NET).\r\n\r\n// The condition IsInitOnly matches fields that are marked with the C# readonly keyword (ReadOnly in VB.NET).\r\n\r\n\r\n\r\n</CQLQuery>
|
176
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Structures should be immutable</Name>\r\nWARN IF Count > 0 IN SELECT TYPES WHERE IsStructure AND !IsImmutable AND !IsInFrameworkAssembly\r\n\r\n// It is deemed as a good practice to make your structure immutable.\r\n// An object is immutable if its state doesn’t change once the object has been created. \r\n// Consequently, a structure is immutable if its instances are immutable.\r\n// Immutable types naturally simplify code by limiting side-effects.\r\n// See some explanations on immutability and how NDepend supports it here:\r\n// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/13/immutable-types-understand-them-and-use-them.aspx\r\n</CQLQuery>
|
177
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Regression on immutable types</Name>\r\nWARN IF Count > 0 IN SELECT TYPES WHERE HasAttribute "OPTIONAL:NDepend.CQL.ImmutableAttribute" AND !IsImmutable\r\n\r\n// An object is immutable if its state doesn’t change once the object has been created. \r\n// Consequently, a class or a structure is immutable if its instances are immutable.\r\n// Immutable types naturally simplify code by limiting side-effects.\r\n// See some explanations on immutability and how NDepend supports it here:\r\n// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/13/immutable-types-understand-them-and-use-them.aspx\r\n\r\n// NDepend.CQL.ImmutableAttribute is defined in the redistributable assembly $NDependInstallDir$\Lib\NDepend.CQL.dll\r\n// You can define your own attribute to tag 'immutable' types.\r\n\r\n</CQLQuery>
|
178
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Regression on pure methods</Name>\r\nWARN IF Count > 0 IN SELECT METHODS WHERE \r\n HasAttribute "OPTIONAL:NDepend.CQL.PureAttribute" AND \r\n ( ChangesObjectState OR ChangesTypeState ) AND\r\n NbLinesOfCode > 0\r\n\r\n// A method is pure if its execution doesn’t change the value of any instance or static field. \r\n// Pure methods naturally simplify code by limiting side-effects.\r\n// See some explanations on immutability / purity and how NDepend supports it here:\r\n// http://codebetter.com/blogs/patricksmacchia/archive/2008/01/13/immutable-types-understand-them-and-use-them.aspx\r\n\r\n// NDepend.CQL.PureAttribute is defined in the redistributable assembly $NDependInstallDir$\Lib\NDepend.CQL.dll\r\n// You can define your own attribute to tag 'pure' methods.\r\n\r\n</CQLQuery>
|
179
|
+
</CQLGroup>
|
180
|
+
<CQLGroup Name="Naming Conventions" Active="True">
|
181
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Instance fields should be prefixed with a '_'</Name>
|
182
|
+
WARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE
|
183
|
+
!NameLike "^_" AND
|
184
|
+
!IsStatic AND
|
185
|
+
!IsLiteral AND
|
186
|
+
!IsGeneratedByCompiler AND
|
187
|
+
!IsSpecialName AND
|
188
|
+
!IsEventDelegateObject
|
189
|
+
|
190
|
+
// This naming convention provokes debate.
|
191
|
+
// Don't hesitate to customize the regex of NameLike to your preference.</CQLQuery>
|
192
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Static fields should be prefixed with a '_'</Name>
|
193
|
+
WARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE
|
194
|
+
!NameLike "^_" AND
|
195
|
+
IsStatic AND
|
196
|
+
!IsLiteral AND
|
197
|
+
!IsGeneratedByCompiler AND
|
198
|
+
!IsSpecialName AND
|
199
|
+
!IsEventDelegateObject
|
200
|
+
|
201
|
+
// This naming convention provokes debate.
|
202
|
+
// Don't hesitate to customize the regex of NameLike to your preference.
|
203
|
+
</CQLQuery>
|
204
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Interface name should begin with a 'I'</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE IsInterface AND !NameLike "^I" AND !IsNested AND !IsInFrameworkAssembly\r\n</CQLQuery>
|
205
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Abstract base class should be suffixed with 'Base'</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE \r\n IsAbstract AND \r\n IsClass AND\r\n DepthOfInheritance == 1 AND // equivalent to: DepthOfDeriveFrom "System.Object" == 1\r\n !NameLike "Base$"\r\n</CQLQuery>
|
206
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Exception class name should be suffixed with 'Exception'</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE IsExceptionClass AND !NameLike "Exception$" AND !IsInFrameworkAssembly\r\n// The name of an exception class should end with 'Exception'.</CQLQuery>
|
207
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Attribute class name should be suffixed with 'Attribute'</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE IsAttributeClass AND !NameLike "Attribute$" AND !IsInFrameworkAssembly\r\n</CQLQuery>
|
208
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Types name should begin with an Upper character</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE \r\n !NameLike "^[A-Z]" AND // The name of a type should begin with an Upper letter.\r\n !IsGeneratedByCompiler AND // Except if it is generated by compiler or ...\r\n !IsInFrameworkAssembly // ... if it is declared in a framework assembly.</CQLQuery>
|
209
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Methods name should begin with an Upper character</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 METHODS WHERE \r\n !NameLike "^[A-Z]" AND \r\n !(IsClassConstructor OR IsConstructor OR \r\n IsPropertyGetter OR IsPropertySetter OR\r\n IsIndexerGetter OR IsIndexerSetter OR\r\n IsEventAdder OR IsEventRemover OR\r\n IsOperator) AND !IsGeneratedByCompiler AND !IsInFrameworkAssembly\r\n// The name of a regular method should begin with an Upper letter.</CQLQuery>
|
210
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Do not name enum values 'Reserved'</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 FIELDS WHERE IsEnumValue AND NameLike "Reserved"\r\n\r\n// This rule assumes that an enumeration member with a name that contains "reserved" \r\n// is not currently used but is a placeholder to be renamed or removed in a future version.\r\n// Renaming or removing a member is a breaking change. You should not expect users to ignore\r\n// a member just because its name contains "reserved" nor can you rely on users to read or \r\n// abide by documentation. Furthermore, because reserved members appear in object browsers \r\n// and smart integrated development environments, they can cause confusion as to which members \r\n// are actually being used.\r\n\r\n// Instead of using a reserved member, add a new member to the enumeration in the future version.\r\n// In most cases, the addition of the new member is not a breaking change, as long as the \r\n// addition does not cause the values of the original members to change.</CQLQuery>
|
211
|
+
<CQLQuery Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False">// <Name>Type names should not match namespaces</Name>\r\nWARN IF Count > 0 IN SELECT TOP 10 TYPES WHERE \r\n NameIs "Collections" OR\r\n NameIs "Forms" OR\r\n NameIs "System" OR\r\n NameIs "UI"\r\n\r\n// Type names should not match the names of namespaces defined in the .NET Framework \r\n// class library. Violating this rule can reduce the usability of the library.</CQLQuery>
|
212
|
+
</CQLGroup>
|
213
|
+
<CQLGroup Name=".NET Framework Usage" Active="True">
|
214
|
+
<CQLGroup Name="System" Active="True">
|
215
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Mark ISerializable types with serializable</Name>\r\nSELECT TYPES WHERE \r\n IsPublic AND !IsDelegate AND\r\n Implement "OPTIONAL:System.Runtime.Serialization.ISerializable" AND \r\n !HasAttribute "OPTIONAL:System.SerializableAttribute"\r\n\r\n// To be recognized by the CLR as serializable, types must be marked with the SerializableAttribute \r\n// attribute even if the type uses a custom serialization routine through implementation of the ISerializable interface.</CQLQuery>
|
216
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Mark assemblies with ComVisible</Name>\r\nWARN IF Count > 0 IN SELECT ASSEMBLIES WHERE \r\n !HasAttribute "OPTIONAL:System.Runtime.InteropServices.ComVisibleAttribute" AND\r\n !IsFrameworkAssembly \r\n\r\n// The ComVisibleAttribute attribute determines how COM clients access managed code. \r\n// Good design dictates that assemblies explicitly indicate COM visibility. \r\n// COM visibility can be set for an entire assembly and then overridden for individual \r\n// types and type members. If the attribute is not present, the contents of the assembly\r\n// are visible to COM clients.</CQLQuery>
|
217
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Mark attributes with AttributeUsageAttribute</Name>\r\nWARN IF Count > 0 IN SELECT TYPES WHERE \r\nDeriveFrom "OPTIONAL:System.Attribute" AND\r\n!HasAttribute "OPTIONAL:System.AttributeUsageAttribute" AND\r\n!IsInFrameworkAssembly \r\n\r\n// When defining a custom attribute, mark it using AttributeUsageAttribute to \r\n// indicate where in the source code the custom attribute can be applied.\r\n// An attribute's meaning and intended usage will determine its valid locations \r\n// in code. For example, if you are defining an attribute that identifies the \r\n// person responsible for maintaining and enhancing each type in a library, \r\n// and responsibility is always assigned at the type level, compilers should \r\n// allow the attribute on classes, enumerations, and interfaces, but should \r\n// not allow it on methods, events, or properties. Organizational policies and\r\n// procedures would dictate whether the attribute should be allowed on assemblies.</CQLQuery>
|
218
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Remove calls to GC.Collect()</Name>\r\nWARN IF Count > 0 IN SELECT METHODS WHERE\r\n IsDirectlyUsing "OPTIONAL:System.GC.Collect()" OR\r\n IsDirectlyUsing "OPTIONAL:System.GC.Collect(Int32)" OR\r\n IsDirectlyUsing "OPTIONAL:System.GC.Collect(Int32,GCCollectionMode)"\r\n\r\n// It is preferrable to avoid calling GC.Collect() explicitely\r\n// in order to avoid some performance pitfall.\r\n// More in information on this here:\r\n// http://blogs.msdn.com/ricom/archive/2004/11/29/271829.aspx</CQLQuery>
|
219
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Don't call GC.Collect() without calling GC.WaitForPendingFinalizers()</Name>\r\nWARN IF Count > 0 IN SELECT METHODS WHERE\r\n (IsDirectlyUsing "OPTIONAL:System.GC.Collect()" OR\r\n IsDirectlyUsing "OPTIONAL:System.GC.Collect(Int32)" OR\r\n IsDirectlyUsing "OPTIONAL:System.GC.Collect(Int32,GCCollectionMode)") \r\n AND\r\n !IsDirectlyUsing "OPTIONAL:System.GC.WaitForPendingFinalizers()" \r\n\r\n// It is preferrable to avoid calling GC.Collect() explicitely\r\n// in order to avoid some performance pitfall.\r\n// But if you wish to call GC.Collect(), you must do it this way:\r\n// GC.Collect();\r\n// GC.WaitForPendingFinalizers();\r\n// GC.Collect();\r\n// To make sure that finalizer got executed, and object with finalizer got cleaned properly.</CQLQuery>
|
220
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Enum Storage should be Int32</Name>\r\nWARN IF Count > 0 IN SELECT FIELDS WHERE \r\n NameIs "value__" AND \r\n !IsOfType "OPTIONAL:System.Int32" AND\r\n !IsInFrameworkAssembly\r\n\r\n// An enumeration is a value type that defines a set of related named constants. By default, \r\n// the System.Int32 data type is used to store the constant value. Even though you can change \r\n// this underlying type, it is not necessary or recommended for most scenarios. Note that there \r\n// is no significant performance gain in using a data type smaller than Int32. If you cannot \r\n// use the default data type, you should use one of the CLS-compliant integral types, Byte, \r\n// Int16, Int32, or Int64, to ensure that all of the enumeration's values are representable in \r\n// CLS-compliant programming languages.</CQLQuery>
|
221
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Do not raise reserved exception types</Name>\r\nWARN IF Count > 0 IN SELECT METHODS WHERE \r\n // The following exception types are reserved and should be thrown only by the Common Language Runtime:\r\n ( DepthOfCreateA "OPTIONAL:System.ExecutionEngineException" == 1 OR \r\n DepthOfCreateA "OPTIONAL:System.IndexOutOfRangeException" == 1 OR \r\n DepthOfCreateA "OPTIONAL:System.NullReferenceException" == 1 OR\r\n DepthOfCreateA "OPTIONAL:System.OutOfMemoryException" == 1 OR\r\n DepthOfCreateA "OPTIONAL:System.StackOverflowException" == 1 OR \r\n DepthOfCreateA "OPTIONAL:System.InvalidProgramException" == 1 OR \r\n DepthOfCreateA "OPTIONAL:System.AccessViolationException" == 1 OR\r\n DepthOfCreateA "OPTIONAL:System.CannotUnloadAppDomainException" == 1 OR\r\n DepthOfCreateA "OPTIONAL:System.BadImageFormatException" == 1 OR \r\n DepthOfCreateA "OPTIONAL:System.DataMisalignedException" == 1 )\r\n</CQLQuery>
|
222
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Use integral or string argument for indexers</Name>\r\nSELECT METHODS WHERE \r\nIsIndexerGetter AND \r\n !( NameIs "get_Item(String)" OR \r\n NameLike "get_Item\(Int" OR \r\n NameLike "get_Item\(Byte" OR\r\n NameLike "get_Item\(SByte" )\r\n\r\n// Indexers, that is, indexed properties, should use integer or string types for the index. \r\n// These types are typically used for indexing data structures and increase the usability of \r\n// the library. Use of the Object type should be restricted to those cases where the specific \r\n// integer or string type cannot be specified at design time. If the design requires other \r\n// types for the index, reconsider whether the type represents a logical data store. If it \r\n// does not represent a logical data store, use a method.</CQLQuery>
|
223
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Uri fields should be of type System.Uri</Name>\r\nWARN IF Count > 0 IN SELECT FIELDS WHERE \r\n (NameLike "Uri$" OR NameLike "Url$") AND !IsOfType "OPTIONAL:System.Uri"\r\n\r\n// A field which name end with 'Uri' is deemed as representing a uri.\r\n// Such field should be of type System.Uri.</CQLQuery>
|
224
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Types should not extend System.ApplicationException</Name>\r\nWARN IF Count > 0 IN SELECT TYPES WHERE\r\n DepthOfDeriveFrom "OPTIONAL:System.ApplicationException" == 1 AND\r\n !IsInFrameworkAssembly\r\n\r\n// For .NET Framework version 1, it was recommended to derive new exceptions from ApplicationException. \r\n// The recommendation has changed and new exceptions should derive from System.Exception or one of its \r\n// subclasses in the System namespace.</CQLQuery>
|
225
|
+
</CQLGroup>
|
226
|
+
<CQLGroup Name="System.Runtime.InteropServices" Active="True">
|
227
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>P/Invokes should be static and not be visible</Name>\r\nWARN IF Count > 0 IN SELECT METHODS WHERE\r\n !IsInFrameworkAssembly AND\r\n (HasAttribute "OPTIONAL:System.Runtime.InteropServices.DllImportAttribute") AND\r\n ( IsPublic OR \r\n !IsStatic)\r\n\r\n// Methods marked with the DllImportAttribute attribute (or methods defined using the \r\n// Declare keyword in Visual Basic) use Platform Invocation Services to access unmanaged \r\n// code. Such methods should not be exposed. Keeping these methods private or internal \r\n// ensures that your library cannot be used to breach security by allowing callers access \r\n// to unmanaged APIs they could not call otherwise.</CQLQuery>
|
228
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Move P/Invokes to NativeMethods class</Name>\r\nWARN IF Count > 0 IN SELECT METHODS WHERE\r\n !IsInFrameworkAssembly AND\r\n HasAttribute "OPTIONAL:System.Runtime.InteropServices.DllImportAttribute" AND\r\n !FullNameLike "NativeMethods."\r\n\r\n// Platform Invocation methods, such as those marked with the System.Runtime.InteropServices.DllImportAttribute \r\n// attribute, or methods defined by using the Declare keyword in Visual Basic, access unmanaged code. \r\n// These methods should be in one of the following classes:\r\n//\r\n// - NativeMethods - This class does not suppress stack walks for unmanaged code permission. \r\n// (System.Security.SuppressUnmanagedCodeSecurityAttribute must not be applied to this class.) \r\n// This class is for methods that can be used anywhere because a stack walk will be performed.\r\n//\r\n// - SafeNativeMethods - This class suppresses stack walks for unmanaged code permission. \r\n// (System.Security.SuppressUnmanagedCodeSecurityAttribute is applied to this class.) \r\n// This class is for methods that are safe for anyone to call. Callers of these methods are not \r\n// required to do a full security review to ensure that the usage is secure because the methods\r\n// are harmless for any caller.\r\n//\r\n// - UnsafeNativeMethods - This class suppresses stack walks for unmanaged code permission. \r\n// (System.Security.SuppressUnmanagedCodeSecurityAttribute is applied to this class.) \r\n// This class is for methods that are potentially dangerous. Any caller of these methods must do\r\n// a full security review to ensure that the usage is secure because no stack walk will be performed.\r\n</CQLQuery>
|
229
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>NativeMethods class should be static and internal</Name>\r\nWARN IF Count > 0 IN SELECT TYPES WHERE\r\n !IsInFrameworkAssembly AND\r\n ( NameIs "NativeMethods" OR\r\n NameIs "SafeNativeMethods" OR\r\n NameIs "UnsafeNativeMethods") AND\r\n IsPublic OR\r\n !IsStatic \r\n\r\n// Native Methods' classes are declared as internal (Friend, in Visual Basic) and static.\r\n</CQLQuery>
|
230
|
+
</CQLGroup>
|
231
|
+
<CQLGroup Name="System.Xml" Active="True">
|
232
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Method should not return concrete XmlNode</Name>\r\nWARN IF Count > 0 IN SELECT METHODS WHERE \r\n( ReturnTypeIs "OPTIONAL:System.Xml.XmlDocument" OR \r\n ReturnTypeIs "OPTIONAL:System.Xml.XmlAttribute" OR \r\n ReturnTypeIs "OPTIONAL:System.Xml.XmlDocumentFragment" OR \r\n ReturnTypeIs "OPTIONAL:System.Xml.XmlEntity" OR \r\n ReturnTypeIs "OPTIONAL:System.Xml.XmlLinkedNode" OR \r\n ReturnTypeIs "OPTIONAL:System.Xml.XmlNotation" OR\r\n ReturnTypeIs "OPTIONAL:System.Xml.XmlNode" )\r\n\r\n// The class System.Xml.XmlNode implements the interface System.Xml.Xpath.IXPathNavigable.\r\n// It is preferrable to return this interface instead of a concrete class.\r\n</CQLQuery>
|
233
|
+
<CQLQuery Active="True" DisplayList="False" DisplayStat="True" DisplaySelectionView="False">// <Name>Types should not extend System.Xml.XmlDocument</Name>\r\nWARN IF Count > 0 IN SELECT TYPES WHERE DepthOfDeriveFrom "OPTIONAL:System.Xml.XmlDocument" == 1\r\n\r\n// Do not create a subclass of XmlDocument if you want to create an XML view of an underlying object model or data source.</CQLQuery>
|
234
|
+
</CQLGroup>
|
235
|
+
</CQLGroup>
|
236
|
+
<CQLGroup Name="Statistics" Active="False">
|
237
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Most used types (TypeRank)</Name>\r\nSELECT TOP 50 TYPES ORDER BY TypeRank DESC\r\n// TypeRank values are computed by applying the Google PageRank \r\n// algorithm on the graph of types' dependencies \r\n// Types with high Rank are the most used ones.\r\n// See the definition of the TypeRank metric here http://www.ndepend.com/Metrics.aspx#TypeRank</CQLQuery>
|
238
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Most used methods (MethodRank)</Name>\r\nSELECT TOP 50 METHODS ORDER BY MethodRank DESC\r\n// MethodRank values are computed by applying the Google PageRank \r\n// algorithm on the graph of methods' dependencies\r\n// Methods with high Rank are the most used ones.\r\n// See the definition of the MethodRank metric here http://www.ndepend.com/Metrics.aspx#MethodRank</CQLQuery>
|
239
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Most used namespaces (NamespaceCa)</Name>\r\nSELECT TOP 50 NAMESPACES ORDER BY NamespaceCa DESC\r\n// The Afferent Coupling for a particular namespace is the number of namespaces that depends directly on it.\r\n// Namespaces with high Ca are the most used ones.\r\n// See the definition of the NamespaceCa metric here http://www.ndepend.com/Metrics.aspx#NamespaceCa</CQLQuery>
|
240
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Most used types (TypeCa)</Name>\r\nSELECT TOP 50 TYPES ORDER BY TypeCa DESC\r\n// The Afferent Coupling for a particular type is the number of types that depends directly on it.\r\n// Types with high Ca are the most used ones.\r\n// See the definition of the TypeCa metric here http://www.ndepend.com/Metrics.aspx#TypeCa</CQLQuery>
|
241
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Most used methods (MethodCa)</Name>\r\nSELECT TOP 50 METHODS ORDER BY MethodCa DESC\r\n// The Afferent Coupling for a particular method is the number of methods that depends directly on it.\r\n// Methods with high Ca are the most used ones\r\n// See the definition of the MethodCa metric here http://www.ndepend.com/Metrics.aspx#MethodCa</CQLQuery>
|
242
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Namespaces that use many other namespaces (NamespaceCe)</Name>\r\nSELECT TOP 50 NAMESPACES ORDER BY NamespaceCe DESC\r\n// The Efferent Coupling for a particular namespace is the number of namespaces it directly depends on.\r\n// Namespaces declared in Framework assemblies are taken account.\r\n// See the definition of the NamespaceCe metric here http://www.ndepend.com/Metrics.aspx#NamespaceCe</CQLQuery>
|
243
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Types that use many other types (TypeCe)</Name>\r\nSELECT TOP 50 TYPES ORDER BY TypeCe DESC\r\n// The Efferent Coupling for a particular type is the number of types it directly depends on.\r\n// Types declared in Framework assemblies are taken account.\r\n// See the definition of the TypeCe metric here http://www.ndepend.com/Metrics.aspx#TypeCe</CQLQuery>
|
244
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>Methods that use many other methods (MethodCe)</Name>\r\nSELECT TOP 50 METHODS ORDER BY MethodCe DESC\r\n// The Efferent Coupling for a particular method is the number of methods it directly depends on.\r\n// Methods declared in Framework assemblies are taken account.\r\n// See the definition of the MethodCe metric here http://www.ndepend.com/Metrics.aspx#MethodCe</CQLQuery>
|
245
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>High-level to low-level assemblies (AssemblyLevel)</Name>\r\nSELECT ASSEMBLIES ORDER BY AssemblyLevel DESC\r\n// Classify assemblies by their Level values.\r\n// See the definition of the AssemblyLevel metric here http://www.ndepend.com/Metrics.aspx#Level</CQLQuery>
|
246
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>High-level to low-level namespaces (NamespaceLevel)</Name>\r\nSELECT NAMESPACES ORDER BY NamespaceLevel DESC\r\n// Classify namespaces by their Level values.\r\n// See the definition of the NamespaceLevel metric here http://www.ndepend.com/Metrics.aspx#Level</CQLQuery>
|
247
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>High-level to low-level types (TypeLevel)</Name>\r\nSELECT TYPES ORDER BY TypeLevel DESC\r\n// Classify types by their Level values.\r\n// See the definition of the TypeLevel metric here http://www.ndepend.com/Metrics.aspx#Level</CQLQuery>
|
248
|
+
<CQLQuery Active="False" DisplayList="False" DisplayStat="False" DisplaySelectionView="False">// <Name>High-level to low-level methods (MethodLevel)</Name>\r\nSELECT METHODS ORDER BY MethodLevel DESC\r\n// Classify methods by their Level values.\r\n// See the definition of the MethodLevel metric here http://www.ndepend.com/Metrics.aspx#Level</CQLQuery>
|
249
|
+
</CQLGroup>
|
250
|
+
</CQLQueries>
|
251
|
+
</NDepend>
|
data/lib/build.bat
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
@echo off
|
2
|
+
|
3
|
+
::Project UppercuT - http://uppercut.googlecode.com
|
4
|
+
::No edits to this file are required - http://uppercut.pbwiki.com
|
5
|
+
|
6
|
+
if '%2' NEQ '' goto usage
|
7
|
+
if '%3' NEQ '' goto usage
|
8
|
+
if '%1' == '/?' goto usage
|
9
|
+
if '%1' == '-?' goto usage
|
10
|
+
if '%1' == '?' goto usage
|
11
|
+
if '%1' == '/help' goto usage
|
12
|
+
|
13
|
+
SET DIR=%~d0%~p0%
|
14
|
+
SET NANT="%DIR%lib\Nant\nant.exe"
|
15
|
+
SET build.config.settings="%DIR%settings\UppercuT.config"
|
16
|
+
|
17
|
+
%NANT% %1 /f:.\build\default.build -D:build.config.settings=%build.config.settings%
|
18
|
+
|
19
|
+
if %ERRORLEVEL% NEQ 0 goto errors
|
20
|
+
|
21
|
+
goto finish
|
22
|
+
|
23
|
+
:usage
|
24
|
+
echo.
|
25
|
+
echo Usage: build.bat
|
26
|
+
echo.
|
27
|
+
goto finish
|
28
|
+
|
29
|
+
:errors
|
30
|
+
EXIT /B %ERRORLEVEL%
|
31
|
+
|
32
|
+
:finish
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="Analyzer" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- DO NOT EDIT THIS FILE - Add custom tasks in BuildTasks.Custom folder with file by the same name - find out more at http://uppercut.pbwiki.com -->
|
5
|
+
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
6
|
+
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
7
|
+
<property name="file.current.no_extension" value="analyze" />
|
8
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
9
|
+
<property name="path.to.toplevel" value=".." />
|
10
|
+
<property name="folder.build_scripts" value="build" overwrite="false" />
|
11
|
+
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
|
12
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}\${path.to.toplevel}\${folder.build_scripts_custom}" />
|
13
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}\${file.current.no_extension}.pre.step" />
|
14
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}\${file.current.no_extension}.post.step" />
|
15
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}\${file.current.no_extension}.replace.step" />
|
16
|
+
<property name="is.replaced" value="false" />
|
17
|
+
<property name="fail.build.on.error" value="true" />
|
18
|
+
|
19
|
+
<target name="go" depends="run_tasks" />
|
20
|
+
|
21
|
+
<target name="run_tasks">
|
22
|
+
<echo message="Running ${project::get-name()} tasks." />
|
23
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
24
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
25
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
26
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
27
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
28
|
+
</target>
|
29
|
+
|
30
|
+
<target name="run_normal_tasks"
|
31
|
+
depends="run_analyzers"
|
32
|
+
description="Analyzing project for quality indicators." />
|
33
|
+
|
34
|
+
<target name="custom_tasks_before">
|
35
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
36
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
37
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
38
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
39
|
+
</exec>
|
40
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
41
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
42
|
+
</exec>
|
43
|
+
</target>
|
44
|
+
|
45
|
+
<target name="custom_tasks_replace">
|
46
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
47
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
48
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
49
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
50
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
51
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
52
|
+
</exec>
|
53
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
54
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
55
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
56
|
+
</exec>
|
57
|
+
</target>
|
58
|
+
|
59
|
+
<target name="run_analyzers">
|
60
|
+
<nant buildfile="${dirs.current}\analyzers\test.step" inheritall="true" />
|
61
|
+
<nant buildfile="${dirs.current}\analyzers\ncover.step" inheritall="true" failonerror="false" />
|
62
|
+
<nant buildfile="${dirs.current}\analyzers\ndepend.step" inheritall="true" failonerror="false" />
|
63
|
+
<nant buildfile="${dirs.current}\analyzers\nitriq.step" inheritall="true" failonerror="false" />
|
64
|
+
<nant buildfile="${dirs.current}\analyzers\moma.step" inheritall="true" failonerror="false" />
|
65
|
+
</target>
|
66
|
+
|
67
|
+
<target name="custom_tasks_after">
|
68
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
69
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
70
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
71
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
72
|
+
</exec>
|
73
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
74
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
75
|
+
</exec>
|
76
|
+
</target>
|
77
|
+
|
78
|
+
</project>
|
@@ -0,0 +1,145 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="GallioTester" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- DO NOT EDIT THIS FILE - This follows a convention for testing with Integration tests being separated from Unit tests - find out more at http://uppercut.pbwiki.com -->
|
5
|
+
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
6
|
+
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
7
|
+
<property name="file.current.no_extension" value="gallio.test" />
|
8
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
9
|
+
<property name="path.to.toplevel" value="..\.." />
|
10
|
+
<property name="folder.build_scripts" value="build" overwrite="false" />
|
11
|
+
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
|
12
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}\${path.to.toplevel}\${folder.build_scripts_custom}\analyzers" />
|
13
|
+
<property name="folder.code_build" value="build_output" overwrite="false" />
|
14
|
+
<property name="dirs.build" value="${dirs.current}\${path.to.toplevel}\${folder.code_build}" />
|
15
|
+
<property name="folder.app.drop" value="${project.name}" overwrite="false" />
|
16
|
+
<property name="dirs.build.code" value="${dirs.build}\${folder.app.drop}" overwrite="false" />
|
17
|
+
<property name="folder.build_artifacts" value="build_artifacts" overwrite="false" />
|
18
|
+
<property name="dirs.build_artifacts" value="${path::get-full-path(dirs.build)}\${folder.build_artifacts}" />
|
19
|
+
<property name="dirs.test_results" value="${dirs.build_artifacts}\gallio" overwrite="false" />
|
20
|
+
<property name="file.test_results" value="gallio-results" overwrite="false" />
|
21
|
+
<property name="time.limit.in.seconds" value="240" />
|
22
|
+
|
23
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}\${file.current.no_extension}.pre.step" />
|
24
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}\${file.current.no_extension}.post.step" />
|
25
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}\${file.current.no_extension}.replace.step" />
|
26
|
+
<property name="is.replaced" value="false" />
|
27
|
+
<property name="fail.build.on.error" value="true" />
|
28
|
+
|
29
|
+
<target name="go" depends="run_tasks" />
|
30
|
+
|
31
|
+
<target name="run_tasks">
|
32
|
+
<echo message="Running ${project::get-name()} tasks." />
|
33
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
34
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
35
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
36
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
37
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
38
|
+
</target>
|
39
|
+
|
40
|
+
<target name="run_normal_tasks"
|
41
|
+
depends="run_tests"
|
42
|
+
description="Testing with Gallio." />
|
43
|
+
|
44
|
+
<target name="custom_tasks_before">
|
45
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
46
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
47
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
48
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
49
|
+
</exec>
|
50
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
51
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
52
|
+
</exec>
|
53
|
+
</target>
|
54
|
+
|
55
|
+
<target name="custom_tasks_replace">
|
56
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
57
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
58
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
59
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
60
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
61
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
62
|
+
</exec>
|
63
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
64
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
65
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
66
|
+
</exec>
|
67
|
+
</target>
|
68
|
+
|
69
|
+
<target name="prepare">
|
70
|
+
<echo message="Removing and adding ${dirs.test_results}."/>
|
71
|
+
<delete dir="${dirs.test_results}" failonerror="false" />
|
72
|
+
<mkdir dir="${dirs.test_results}" />
|
73
|
+
</target>
|
74
|
+
|
75
|
+
<target name="load_tasks">
|
76
|
+
<echo message="Loading Gallio Nant Tasks from Program Files." />
|
77
|
+
<loadtasks assembly="C:\Program Files (x86)\Gallio\bin\Gallio.NAntTasks.dll" if="${file::exists('C:\Program Files (x86)\Gallio\bin\Gallio.NAntTasks.dll')}" />
|
78
|
+
<loadtasks assembly="C:\Program Files\Gallio\bin\Gallio.NAntTasks.dll" if="${file::exists('C:\Program Files\Gallio\bin\Gallio.NAntTasks.dll')}" />
|
79
|
+
</target>
|
80
|
+
|
81
|
+
<target name="run_tests" depends="prepare,load_tasks" description="Running Unit Tests">
|
82
|
+
<echo message="Running tests using Gallio and putting results in ${dirs.test_results}."/>
|
83
|
+
<gallio working-directory="${dirs.build}"
|
84
|
+
report-types="Html;Xml;Text"
|
85
|
+
report-directory="${dirs.test_results}"
|
86
|
+
report-name-format="${file.test_results}"
|
87
|
+
show-reports="false"
|
88
|
+
failonerror="true"
|
89
|
+
verbosity="Normal"
|
90
|
+
echo-results="true"
|
91
|
+
run-time-limit="${time.limit.in.seconds}"
|
92
|
+
filter="exclude Category:Database or Category:Integration or Category:Slow or Category:NotWorking or Categroy:Ignore or Category:database or Category:integration or Category:slow or Category:notworking or Categroy:ignore"
|
93
|
+
>
|
94
|
+
<files>
|
95
|
+
<exclude name="${dirs.build.code}\*Database*dll" />
|
96
|
+
<exclude name="${dirs.build.code}\*.Integration*dll" />
|
97
|
+
<exclude name="${dirs.build.code}\TestFu.dll" />
|
98
|
+
<include name="${dirs.build.code}\*Test*dll" />
|
99
|
+
<include name="${dirs.build.code}\*.Spec*dll" />
|
100
|
+
</files>
|
101
|
+
</gallio>
|
102
|
+
</target>
|
103
|
+
|
104
|
+
<target name="run_all_tests" depends="prepare,load_tasks" description="Running All Unit Tests">
|
105
|
+
<echo message="Running all tests (including integration tests) using Gallio and putting results in ${dirs.test_results}."/>
|
106
|
+
<gallio working-directory="${dirs.build}"
|
107
|
+
report-types="Html;Xml;Text"
|
108
|
+
report-directory="${dirs.test_results}"
|
109
|
+
report-name-format="${file.test_results}"
|
110
|
+
show-reports="false"
|
111
|
+
failonerror="true"
|
112
|
+
verbosity="Normal"
|
113
|
+
echo-results="true"
|
114
|
+
run-time-limit="${time.limit.in.seconds}"
|
115
|
+
>
|
116
|
+
<files>
|
117
|
+
<exclude name="${dirs.build.code}\TestFu.dll" />
|
118
|
+
<include name="${dirs.build.code}\*Test*dll" />
|
119
|
+
<include name="${dirs.build.code}\*.Spec*dll" />
|
120
|
+
</files>
|
121
|
+
</gallio>
|
122
|
+
</target>
|
123
|
+
|
124
|
+
<target name="open_results">
|
125
|
+
<echo message="Opening results at ${path::get-full-path(dirs.test_results)}\${file.test_results}.html."/>
|
126
|
+
<exec
|
127
|
+
spawn="true"
|
128
|
+
program="${environment::get-folder-path('ProgramFiles')}\Internet Explorer\iexplore.exe"
|
129
|
+
commandline="${path::get-full-path(dirs.test_results)}\${file.test_results}.html"
|
130
|
+
>
|
131
|
+
</exec>
|
132
|
+
</target>
|
133
|
+
|
134
|
+
<target name="custom_tasks_after">
|
135
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
136
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
137
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
138
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
139
|
+
</exec>
|
140
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
141
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
142
|
+
</exec>
|
143
|
+
</target>
|
144
|
+
|
145
|
+
</project>
|