diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9ccb41e1..2b333a74 100755 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4865,12 +4865,16 @@ XML: - ".ant" - ".axml" - ".builds" + - ".ccproj" - ".ccxml" - ".clixml" - ".cproject" + - ".cscfg" + - ".csdef" - ".csl" - ".csproj" - ".ct" + - ".depproj" - ".dita" - ".ditamap" - ".ditaval" @@ -4893,6 +4897,7 @@ XML: - ".mm" - ".mod" - ".mxml" + - ".ndproj" - ".nproj" - ".nuspec" - ".odd" @@ -4900,6 +4905,7 @@ XML: - ".pkgproj" - ".plist" - ".pluginspec" + - ".proj" - ".props" - ".ps1xml" - ".psc1" @@ -4910,6 +4916,7 @@ XML: - ".sch" - ".scxml" - ".sfproj" + - ".shproj" - ".srdf" - ".storyboard" - ".stTheme" diff --git a/samples/XML/NDepends_Example.ndproj b/samples/XML/NDepends_Example.ndproj new file mode 100644 index 00000000..6c516d8c --- /dev/null +++ b/samples/XML/NDepends_Example.ndproj @@ -0,0 +1,77 @@ + + + c:\temp + + + + C:\Windows\Microsoft.NET\Framework\v4.0.30319 + C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF + + +
Application Metrics
+
.NET Assemblies Metrics
+
Treemap Metric View
+
.NET Assemblies Abstractness vs. Instability
+
.NET Assemblies Dependencies
+
.NET Assemblies Dependency Graph
+
.NET Assemblies Build Order
+
Analysis Log
+
CQL Rules Violated
+
Types Metrics
+
Types Dependencies
+
+ + + + + + + Discard generated and designer Methods from JustMyCode +// --- Make sure to make this query richer to discard generated methods from NDepend rules results --- +notmycode + +// +// First define source files paths to discard +// +from a in Application.Assemblies +where a.SourceFileDeclAvailable +let asmSourceFilesPaths = a.SourceDecls.Select(s => s.SourceFile.FilePath) + +let sourceFilesPathsToDiscard = ( + from filePath in asmSourceFilesPaths + let filePathLower= filePath.ToString().ToLower() + where + filePathLower.EndsWithAny( + ".g.cs", // Popular pattern to name generated files. + ".g.vb", + ".xaml", // notmycode WPF xaml code + ".designer.cs", // notmycode C# Windows Forms designer code + ".designer.vb") // notmycode VB.NET Windows Forms designer code + || + // notmycode methods in source files in a directory containing generated + filePathLower.Contains("generated") + select filePath +).ToHashSet() + +// +// Second: discard methods in sourceFilesPathsToDiscard +// +from m in a.ChildMethods +where (m.SourceFileDeclAvailable && + sourceFilesPathsToDiscard.Contains(m.SourceDecls.First().SourceFile.FilePath)) || + // Generated methods might be tagged with this attribute + m.HasAttribute ("System.CodeDom.Compiler.GeneratedCodeAttribute".AllowNoMatch()) +select new { m, m.NbLinesOfCode }]]> + Discard generated Fields from JustMyCode +// --- Make sure to make this query richer to discard generated fields from NDepend rules results --- +notmycode +from f in Application.Fields where + f.HasAttribute ("System.CodeDom.Compiler.GeneratedCodeAttribute".AllowNoMatch()) || + + // Eliminate "components" generated in Windows Form Conrol context + f.Name == "components" && f.ParentType.DeriveFrom("System.Windows.Forms.Control".AllowNoMatch()) +select f]]> + + + +
diff --git a/samples/XML/cloudconfig.cscfg b/samples/XML/cloudconfig.cscfg new file mode 100644 index 00000000..da610d0e --- /dev/null +++ b/samples/XML/cloudconfig.cscfg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/samples/XML/clouddef.csdef b/samples/XML/clouddef.csdef new file mode 100644 index 00000000..ad3f5537 --- /dev/null +++ b/samples/XML/clouddef.csdef @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/samples/XML/configdef.cscfg b/samples/XML/configdef.cscfg new file mode 100644 index 00000000..da610d0e --- /dev/null +++ b/samples/XML/configdef.cscfg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/samples/XML/dependency-example.depproj b/samples/XML/dependency-example.depproj new file mode 100644 index 00000000..1647e891 --- /dev/null +++ b/samples/XML/dependency-example.depproj @@ -0,0 +1,14 @@ + + + + + 3.9.0.0 + Library + dotnet5.1 + .NETPlatform,Version=v5.1 + + + + + + diff --git a/samples/XML/example-sharedproj.shproj b/samples/XML/example-sharedproj.shproj new file mode 100644 index 00000000..930ea059 --- /dev/null +++ b/samples/XML/example-sharedproj.shproj @@ -0,0 +1,11 @@ + + + + {86244B26-C4AE-4F69-9315-B6148C0FE270} + + + + + + + diff --git a/samples/XML/example.ccproj b/samples/XML/example.ccproj new file mode 100644 index 00000000..81a54b16 --- /dev/null +++ b/samples/XML/example.ccproj @@ -0,0 +1,38 @@ + + + + Debug + AnyCPU + 1.0.0 + {0beae469-c1c6-4648-a2e5-0ae0ea9efffa} + Library + Properties + MyDef + MyDef + True + My + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + + + + + + + My.Web + {1515c2c3-0b57-422c-a6f9-0891b86fb7d3} + True + Web + My.Web + + + diff --git a/samples/XML/msbuild-example.proj b/samples/XML/msbuild-example.proj new file mode 100644 index 00000000..6ff75cc0 --- /dev/null +++ b/samples/XML/msbuild-example.proj @@ -0,0 +1,85 @@ + + + + + + $(MSBuildProjectDirectory)\.. + $(SolutionRoot)\Src\Bowerbird.Website + $(SolutionRoot)\Release + $([System.DateTime]::Now.ToString("yyyyMMdd")) + $([System.DateTime]::Now.ToString("hhmm")) + $(ArtifactsDir)\$(CurrentBuildDateStamp)-$(Configuration) + + + 0 + 1 + 0 + + + + $(CurrentBuildDir)\Web.config + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +