public DepenendencyRule(Severity severity, LibraryMatcher source, LibraryMatcher target, DependencyMatcher dependency, bool allow,
     ConfigLocation location)
     : base(severity, location)
 {
     Source = source ?? ((l, r) => true);
     Target = target ?? ((l, r) => true);
     Dependency = dependency ?? ((d, r) => true);
     Allow = allow;
 }
        private bool Matches(LibraryMatcher test, Library proj, Matchers.Reporter reporter)
        {
            if (test(proj, (f, v, m) => reporter("Library " + f, v, m)))
                return true;

            if (proj.GroupElement != null && test(proj.GroupElement, (f, v, m) => reporter("Group " + f, v, m)))
                return true;

            return false;
        }
 private static bool MatchesProjWithPath(LibraryMatcher matcher, string path)
 {
     return matcher(TestUtils.ProjWithPath(path), Matchers.NullReporter);
 }
 private static bool MatchesProjWithName(LibraryMatcher matcher, string name)
 {
     return matcher(TestUtils.ProjWithName(name), Matchers.NullReporter);
 }
Beispiel #5
0
 public Ignore(LibraryMatcher matches, ConfigLocation location)
 {
     Matches = matches;
     Location = location;
 }
Beispiel #6
0
 public Group(string name, LibraryMatcher matches, ConfigLocation location)
 {
     Name = name;
     Matches = matches;
     Location = location;
 }