diff --git a/internal/linters/c/cppcheck/README.md b/internal/linters/c/cppcheck/README.md index bc2d85a2..d54c828f 100644 --- a/internal/linters/c/cppcheck/README.md +++ b/internal/linters/c/cppcheck/README.md @@ -1,10 +1,9 @@ # Cppcheck - A tool for static C/C++ code analysis +# cppcheck linter Syntax:
cppcheck [OPTIONS] [files or paths]
-If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c, *.ipp, *.ixx, *.tpp, and *.txx files are checked recursively from the given directory.
- -Example usage in this repo:
+in this repo:
Recursively check the current folder, format the error messages as file name:line number:column number: warning message and don't print progress:
cppcheck --quiet --template='{file}:{line}:{column}: {message}' .
diff --git a/internal/linters/linters.go b/internal/linters/linters.go index 1d0a9e62..acc88af2 100644 --- a/internal/linters/linters.go +++ b/internal/linters/linters.go @@ -276,6 +276,7 @@ func Parse(log *xlog.Logger, output []byte, lineParser LineParser) (map[string][ // common format LinterLine func GeneralLineParser(line string) (*LinterOutput, error) { + log.Infof("line is %v", line) pattern := `^(.*):(\d+):(\d+): (.*)$` regex, err := regexp.Compile(pattern) if err != nil { @@ -297,11 +298,6 @@ func GeneralLineParser(line string) (*LinterOutput, error) { return nil, err } - log.Infof("file is %s", (matches[1])) - log.Info(int(lineNumber)) - log.Info(int(columnNumber)) - log.Infof("message is %s", matches[4]) - return &LinterOutput{ File: matches[1], Line: int(lineNumber),