Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
output oclint message
Browse files Browse the repository at this point in the history
  • Loading branch information
wrmswindmill committed Jul 27, 2019
1 parent 830bb6f commit 11dd0e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -167,9 +167,12 @@ script:
-disable-rule=DoubleNegative \
-disable-rule=MultipleUnaryOperator \
-disable-rule=DeepNestedBlock \
-disable-rule=AssignIvarOutsideAccessors \
-max-priority-1=15000 \
-max-priority-2=15000 \
-max-priority-3=15000
-max-priority-3=15000 > oclint.log
export COMMAND="cat ios/sdk/oclint.log | grep -i \"P[1|2]\""
cd ../../ && npm run danger -- run --dangerfile ./dangerfile-output.js
fi
fi
Expand Down
12 changes: 12 additions & 0 deletions dangerfile-output.js
@@ -0,0 +1,12 @@
import { fail, warn } from 'danger'

const shell = require('shelljs')
const command = process.env.COMMAND
const child = shell.exec(command)

if (child.stdout !== '') {
warn(child.stdout)
}
if (child.stderr !== '') {
fail(child.stderr)
}

0 comments on commit 11dd0e5

Please sign in to comment.