Add diff format in help doc
@@ -67,7 +67,7 @@ type option struct {
const (
diffCmdDoc = `diff command (e.g. "git diff") for local reporter. Do not use --relative flag for git command.`
diffStripDoc = "strip NUM leading components from diff file names (equivalent to 'patch -p') (default is 1 for git diff)"
- efmsDoc = `list of errorformat (https://github.com/reviewdog/errorformat)`
+ efmsDoc = `list of supported machine-readable format and errorformat (https://github.com/reviewdog/errorformat)`
fDoc = `format name (run -list to see supported format name) for input. It's also used as tool name in review comment if -name is empty`
fDiffStripDoc = `option for -f=diff: strip NUM leading components from diff file names (equivalent to 'patch -p') (default is 1 for git diff)`
listDoc = `list supported pre-defined format names which can be used as -f arg`
@@ -396,12 +396,13 @@ github-pr-check reporter as a fallback.
func runList(w io.Writer) error {
tabw := tabwriter.NewWriter(w, 0, 8, 0, '\t', 0)
+ fmt.Fprintf(tabw, "%s\t%s\t- %s\n", "rdjson", "Reviewdog Diagnostic JSON Format (JSON of DiagnosticResult message)", "https://github.com/reviewdog/reviewdog")
+ fmt.Fprintf(tabw, "%s\t%s\t- %s\n", "rdjsonl", "Reviewdog Diagnostic JSONL Format (JSONL of Diagnostic message)", "https://github.com/reviewdog/reviewdog")
+ fmt.Fprintf(tabw, "%s\t%s\t- %s\n", "diff", "Unified Diff Format", "https://en.wikipedia.org/wiki/Diff#Unified_format")
+ fmt.Fprintf(tabw, "%s\t%s\t- %s\n", "checkstyle", "checkstyle XML format", "http://checkstyle.sourceforge.net/")
for _, f := range sortedFmts(fmts.DefinedFmts()) {
fmt.Fprintf(tabw, "%s\t%s\t- %s\n", f.Name, f.Description, f.URL)
}
- fmt.Fprintf(tabw, "%s\t%s\t- %s\n", "checkstyle", "checkstyle XML format", "http://checkstyle.sourceforge.net/")
- fmt.Fprintf(tabw, "%s\t%s\t- %s\n", "rdjsonl", "Reviewdog Diagnostic JSONL Format (JSONL of Diagnostic message)", "https://github.com/reviewdog/reviewdog")
- fmt.Fprintf(tabw, "%s\t%s\t- %s\n", "rdjson", "Reviewdog Diagnostic JSON Format (JSON of DiagnosticResult message)", "https://github.com/reviewdog/reviewdog")
return tabw.Flush()
}
