Skip to content

Commit

Permalink
Merge pull request #297 from danger/remove_getting_started
Browse files Browse the repository at this point in the history
More guides updates
  • Loading branch information
orta committed Jun 28, 2017
2 parents 09dcbd7 + a0c9bdd commit c5f76a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 152 deletions.
136 changes: 0 additions & 136 deletions docs/guides/getting_started.html.md

This file was deleted.

28 changes: 12 additions & 16 deletions docs/tutorials/node-app.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,21 @@ If your tool does not have an extra log file output option, you can look at usin

And here's a really simple check that it contains the word "Failed" and to post the logs into the PR.

````js
import { danger, markdown } from "danger"

import contains from "lodash-contains"
import fs from "fs"
```js
import { danger, markdown } from "danger"

const testFile = "tests-output.log"
const linterOutput = fs.readFileSync(testFile).toString()
import contains from "lodash-contains"
import fs from "fs"

if (contains(linterOutput, "Failed")) {
const code = "```"
markdown(`These changes failed to pass the linter:
const testFile = "tests-output.log"
const linterOutput = fs.readFileSync(testFile).toString()

${code}
${linterOutput}
${code}
`)
}
````
if (contains(linterOutput, "Failed")) {
markdown(`These changes failed to pass the linter:
${linterOutput}
`)
}
```

More mature tools may have a JSON output reporter, so you can parse that file and create your own report for danger to post.

Expand Down

0 comments on commit c5f76a3

Please sign in to comment.