diff --git a/bin/htmlhint b/bin/htmlhint
index d81231324..89e6e656b 100755
--- a/bin/htmlhint
+++ b/bin/htmlhint
@@ -54,6 +54,7 @@ program
.option('-f, --format <'+arrSupportedFormatters.join('|')+'>', 'output messages as custom format')
.option('-i, --ignore ', 'add pattern to exclude matches')
.option('--nocolor', 'disable color')
+ .option('--warn', 'Warn only, exit with 0')
.parse(process.argv);
if(program.list){
@@ -134,7 +135,7 @@ function hintTargets(arrTargets, options){
allHintCount: allHintCount,
time: spendTime
});
- process.exit(allHintCount > 0 ? 1: 0);
+ process.exit(!program.warn && allHintCount > 0 ? 1 : 0);
});
}