palate 0.3.9

File type detection combining tft and hyperpolyglot
Documentation
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<NDepend AppName="ExampleNDApp" Platform="DotNet">
  <OutputDir KeepHistoric="True" KeepXmlFiles="True">c:\temp</OutputDir>
  <Assemblies />
  <FrameworkAssemblies />
  <Dirs>
    <Dir>C:\Windows\Microsoft.NET\Framework\v4.0.30319</Dir>
    <Dir>C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF</Dir>
  </Dirs>
  <Report Kind="0" SectionsEnabled="12287" XslPath="" Flags="64512">
    <Section Enabled="True">Application Metrics</Section>
    <Section Enabled="True">.NET Assemblies Metrics</Section>
    <Section Enabled="True">Treemap Metric View</Section>
    <Section Enabled="True">.NET Assemblies Abstractness vs. Instability</Section>
    <Section Enabled="True">.NET Assemblies Dependencies</Section>
    <Section Enabled="True">.NET Assemblies Dependency Graph</Section>
    <Section Enabled="True">.NET Assemblies Build Order</Section>
    <Section Enabled="True">Analysis Log</Section>
    <Section Enabled="True">CQL Rules Violated</Section>
    <Section Enabled="True">Types Metrics</Section>
    <Section Enabled="False">Types Dependencies</Section>
  </Report>
  <BuildComparisonSetting ProjectMode="DontCompare" BuildMode="MostRecentAnalysisResultAvailable" ProjectFileToCompareWith="" BuildFileToCompareWith="" NDaysAgo="1" />
  <BaselineInUISetting ProjectMode="DontCompare" BuildMode="MostRecentAnalysisResultAvailable" ProjectFileToCompareWith="" BuildFileToCompareWith="" NDaysAgo="1" />
  <CoverageFiles UncoverableAttribute="" />
  <SourceFileRebasing FromPath="" ToPath="" />
  <Queries>
    <Group Name="Code Quality" Active="True" ShownInReport="False">
      <Query Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False" IsCriticalRule="False"><![CDATA[// <Name>Discard generated and designer Methods from JustMyCode</Name>
// --- 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 }]]></Query>
      <Query Active="True" DisplayList="True" DisplayStat="True" DisplaySelectionView="False" IsCriticalRule="False"><![CDATA[// <Name>Discard generated Fields from JustMyCode</Name>
// --- 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]]></Query>
    </Group>
  </Queries>
  <WarnFilter />
</NDepend>