Esempio n. 1
0
 public bool PassAudit()
 {
     return(MissingPackages.IsEmpty() &&
            ProjectPackages.IsEmpty() &&
            InconsistentPackages.IsEmpty() &&
            UnusedPackages.IsEmpty() &&
            SnapshotPackages.IsEmpty() &&
            MissingPackageReferences.IsEmpty() &&
            DuplicatePackageReferences.IsEmpty() &&
            BindingRedirectMismatchReferences.IsEmpty() &&
            BadProjectRefGuids.IsEmpty() &&
            IllegalNugetTargets.IsEmpty());
 }
Esempio n. 2
0
        public string VsCommand()
        {
            var sb = new StringBuilder();

            UnusedPackages.ForEach(p => sb.AppendFormat("{0} -Project {1}\n", p.VsCommand(), RoslynProject.Name));
            MissingPackages.ForEach(p => sb.AppendFormat("{0} -Project {1}\n", p.VsCommand(), RoslynProject.Name));

            if (InconsistentPackages != null)
            {
                InconsistentPackages.ForEach(p => sb.AppendLine(p.VsCommand()));
            }

            // These do not have Visual Studio Commands yet
            //SnapshotPackages.ForEach(p => sb.AppendFormat("{0} -Project {1}\n", p.VsCommand(), RoslynProject.Name));
            //CsprojOnlyReferences.ForEach(p => sb.AppendFormat("{0} -Project {1}\n", p.VsCommand(), RoslynProject.Name));
            //ConfigOnlyReferences.ForEach(p => sb.AppendFormat("{0} -Project {1}\n", p.VsCommand(), RoslynProject.Name));

            return(sb.ToString());
        }
Esempio n. 3
0
 public XElement CreateDetailedReport()
 {
     return(new XElement(
                "UsageDetails",
                new XElement(
                    "Unknown",
                    UnusedPackages.Select(id => Node("Package", id, null))),
                new XElement(
                    "PackageUsages",
                    GroupsToElements(
                        Usages,
                        new UsageGrouping.Package(),
                        new UsageGrouping.Project(),
                        new UsageGrouping.AssetsFile())),
                new XElement(
                    "ProjectUsages",
                    GroupsToElements(
                        Usages,
                        new UsageGrouping.Project(),
                        new UsageGrouping.Package(),
                        new UsageGrouping.AssetsFile()))));
 }
Esempio n. 4
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine(RoslynProject.Name);

            UnusedPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            ProjectPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            MissingPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            MissingPackageReferences.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            BindingRedirectMismatchReferences.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            SnapshotPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            DuplicatePackageReferences.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            BadProjectRefGuids.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            IllegalNugetTargets.ForEach(p => sb.AppendFormat("\t{0}\n", p));

            if (InconsistentPackages != null)
            {
                InconsistentPackages.ForEach(p => sb.AppendFormat("\t{0}\n", p));
            }

            return(sb.ToString());
        }