public void MutateReadme() { var basePath = Path.Combine(Assembly.GetExecutingAssembly().Location, "..", "..", "..", "..", ".."); var linecounter = new LineCounting(); linecounter.ReplaceWebshieldsInFile(basePath, Path.Combine(basePath, "README.md")); }
public void Run() { var files = new LineCounting().GetFiles(@"C:\src\"); Stopwatch w = Stopwatch.StartNew(); var res = new LineCounting().CountFiles(files); Console.WriteLine("Time: " + w.ElapsedMilliseconds); Console.WriteLine(new WebFormatter().CreateGithubShields(res.Total)); }
public void RunSrc() { var files = new LineCounting().GetFiles(@"C:\src\"); Stopwatch w = Stopwatch.StartNew(); var res = new LineCounting().CountFiles(files); Console.WriteLine("files: " + res.Files); Console.WriteLine("Time: " + w.ElapsedMilliseconds); Console.WriteLine(res.Print()); Console.WriteLine($"total: code {res.Total.CodeLines} and test {res.Total.TestCodeLines} and doc {res.Total.DocumentationLines}"); }
private static Stats StatFolder(string path) { try { Console.WriteLine(); Console.WriteLine(); var w = Stopwatch.StartNew(); var files = new LineCounting().GetFiles(path); var res = new LineCounting().CountFiles(files); PrintStats(res, w, path); return(res); } catch (Exception e) { Console.WriteLine(e); } return(null); }