Skip to content

Commit 85c6e70

Browse files
committed
feat(cli): add verbose option #606
1 parent 5b9ce68 commit 85c6e70

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

@commitlint/cli/src/cli.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ const flags = {
7979
description: 'toggle console output',
8080
type: 'boolean'
8181
},
82+
verbose: {
83+
alias: 'vb',
84+
default: false,
85+
description: 'show console output even on success',
86+
type: 'boolean'
87+
},
8288
to: {
8389
alias: 't',
8490
default: null,
@@ -198,7 +204,9 @@ async function main(options) {
198204
const output = format(report, {color: flags.color});
199205

200206
if (!flags.quiet) {
201-
console.log(output);
207+
if (!report.valid || report.warningCount > 0 || flags.verbose) {
208+
console.log(output);
209+
}
202210
}
203211

204212
if (!report.valid) {

0 commit comments

Comments
 (0)