Beispiel #1
0
        private static bool IsCode(string line)
        {
            var checkedLine = line.Replace(" ", "").Replace("\t", "");

            return
                ((CodeEndings.Any(ending => checkedLine.EndsWith(ending, StringComparison.Ordinal)) ||
                  CodeParts.Any(part => checkedLine.Contains(part)) ||
                  (checkedLine.Length - checkedLine.Replace("&&", "").Replace("||", "").Length) / 2 >= 3) &&
                 !checkedLine.Contains("License"));
        }
 private static bool EndsWithCode(string checkedLine)
 {
     return(CodeEndings.Any(ending => checkedLine.EndsWith(ending, StringComparison.Ordinal)));
 }