From b0ef944f1798f2655a620a871f61e634d4bb503d Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Wed, 16 Sep 2020 12:24:47 +0800 Subject: [PATCH] feat: add coloc by directory for testing --- cmd/cloc.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/cloc.go b/cmd/cloc.go index 039486a4..205f5868 100644 --- a/cmd/cloc.go +++ b/cmd/cloc.go @@ -36,12 +36,16 @@ var clocCmd = &cobra.Command{ } } - for range dirs { - //processor.DirFilePaths = + processor.Format = "cloc-yaml" + + for _, dir := range dirs { + processor.DirFilePaths = []string{dir} processor.ConfigureGc() processor.ConfigureLazy(true) processor.Process() } + + return } else { processor.DirFilePaths = args }