danger / swift

⚠️ Stop saying "you forgot to …" in code review
https://danger.systems/swift/
MIT License
1.05k stars 142 forks source link

1 fail every time #245

Closed meteora8888 closed 5 years ago

meteora8888 commented 5 years ago

Launching Danger Swift local (v1.5.6) Finding out where the danger executable is Running: /usr/local/bin/danger local --process danger-swift --passURLForDSL danger:localGetDiff > git diff master...HEAD +0ms danger:process_runner Debug mode on for Danger v8.0.0 +0ms danger:process_runner Starting sub-process run +0ms danger:localGetDiff > git log master...HEAD --pretty=format:{ "sha": "%H", "parents": "%p", "author": {"name": "%an", "email": "%ae", "date": "%ai" }, "committer": {"name": "%cn", "email": "%ce", "date": "%ci" }, "message": "%f"}, +0ms danger:process_runner { danger:process_runner dangerJSONDSL: { danger:process_runner git: { danger:process_runner fileMatch: [Function], danger:process_runner modified_files: [Array], danger:process_runner created_files: [], danger:process_runner deleted_files: [], danger:process_runner commits: [Array], danger:process_runner diffForFile: [Function: diffForFile], danger:process_runner structuredDiffForFile: [Function: structuredDiffForFile], danger:process_runner JSONPatchForFile: [Function: JSONPatchForFile], danger:process_runner JSONDiffForFile: [Function: JSONDiffForFile], danger:process_runner linesOfCode: [Function: linesOfCode] danger:process_runner }, danger:process_runner github: null, danger:process_runner settings: { github: [Object], cliArgs: [Object] } danger:process_runner } danger:process_runner } +23ms danger:process_runner Preparing to run: danger-swift +3ms danger:runDangerSubprocess Running sub-process: danger-swift - +0ms danger:runDangerSubprocess Started passing in STDIN via the URL: danger://dsl//var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-dsl.json +5ms danger:runDangerSubprocess Passed DSL in via STDIN +1ms Ran with: /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/_tmp_dangerfile.swift /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-dsl.json /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-response.json Decoding the DSL into Swift types Setting up to dump results Sending results back to Danger

danger:runDangerSubprocess Got JSON URL from STDOUT, results are at: danger:runDangerSubprocess danger-results://var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-response.json +1s Got URL for JSON: /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-dsl.json Created a temporary file for the Dangerfile DSL at: /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-dsl.json Running Dangerfile at: Dangerfile.swift Preparing to compile Running: /usr/bin/swiftc --driver-mode=swift -L /usr/local/lib/danger -I /usr/local/lib/danger -lDanger /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/_tmp_dangerfile.swift /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-dsl.json /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-response.json Completed evaluation Saving and storing the results at /var/folders/5f/l_171f252xq69s5vkgv44tw80000gn/T/danger-response.json

danger:runDangerSubprocess child process exited with code 0 +4ms danger:jsonToDSL Creating pr DSL from JSON +0ms danger:localGetDiff > git diff master...HEAD +1s danger:localGetDiff > git log master...HEAD --pretty=format:{ "sha": "%H", "parents": "%p", "author": {"name": "%an", "email": "%ae", "date": "%ai" }, "committer": {"name": "%cn", "email": "%ce", "date": "%ci" }, "message": "%f"}, +1s danger:executor Got results back: { messages: [ { message: 'Highlight something in the table' } ], markdowns: [ { message: 'Make sure not to ignore warnings!' } ], meta: { runtimeHref: 'https://danger.systems/swift', runtimeName: 'Danger Swift' }, fails: [ { message: 'Something that must be changed' } ], warnings: [ { message: 'Something pretty bad, but not important enough to fail the build' } ] } +0ms danger:executor Evaluator settings { stdoutOnly: true, verbose: undefined, jsonOnly: false, dangerID: 'Danger', passURLForDSL: true, disableGitHubChecksSupport: true, failOnErrors: undefined } +1ms danger:executor Writing to STDOUT: { messages: [ { message: 'Highlight something in the table' } ], markdowns: [ { message: 'Make sure not to ignore warnings!' } ], meta: { runtimeHref: 'https://danger.systems/swift', runtimeName: 'Danger Swift' }, fails: [ { message: 'Something that must be changed' } ], warnings: [ { message: 'Something pretty bad, but not important enough to fail the build' } ] } +1ms Danger: ⅹ Failing the build, there is 1 fail.

Failures

Something that must be changed

Warnings

Something pretty bad, but not important enough to fail the build

Messages

Highlight something in the table

Markdowns

Make sure not to ignore warnings!

No clue why it always fails. Tried also with travis but no change

Worker information hostname: 4cc4696b-82bf-43c5-80fd-d9366ecb5907@1.worker-com-7dbdb678b6-qspll.macstadium-prod-2 version: v6.2.0 https://github.com/travis-ci/worker/tree/5e5476e01646095f48eec13196fdb3faf8f5cbf7 instance: 049c9c3d-809e-4dbe-9b2e-14ad4b8a2ec4 travis-ci-macos10.13-xcode10.1-1540999528 (via amqp) startup: 1m4.813012377s nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local" Run npm config delete prefix or nvm use --delete-prefix v10.13.0 --silent to unset it. Build system information Build language: ruby Build id: 114976069 Job id: 206823322 Runtime kernel version: 17.7.0 travis-build version: 9f4eb462c Build image provisioning date and time Wed Oct 31 18:27:04 GMT 2018 Operating System Details ProductName: Mac OS X ProductVersion: 10.13.6 BuildVersion: 17G65 Git version git version 2.19.1 bash version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17) Copyright (C) 2007 Free Software Foundation, Inc. GCC version Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin LLVM version Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Pre-installed Ruby versions ruby-2.3.5 ruby-2.4.5 Pre-installed Node.js versions v10.13.0 v4.9.1 v5.12.0 v6.14.4 v8.12.0 mvn -version Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z) Maven home: /usr/local/Cellar/maven/3.5.4/libexec Java version: 11.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac" Uninstalled oclint to prevent interference with other packages. If you need oclint, you must explicitly install it. git.checkout 0.43s$ git clone --depth=50 https://github.com/meteora8888/AdoKod.git meteora8888/AdoKod Cloning into 'meteora8888/AdoKod'... $ cd meteora8888/AdoKod 0.30s$ git fetch origin +refs/pull/3/merge: From https://github.com/meteora8888/AdoKod

Every time I try a pull request lint passes but Danger fails on the like let danger = Danger(). When I comment it out it passes.

f-meloni commented 5 years ago

Hey! Had a look at your repo, and found this: https://github.com/meteora8888/AdoKod/blob/master/Dangerfile.swift#L14

The problem is that you have those lines in your Dangerfile

// You can use these functions to send feedback:
message("Highlight something in the table")
warn("Something pretty bad, but not important enough to fail the build")
fail("Something that must be changed")
markdown("Make sure not to ignore warnings!")

They are probably from the docs, but they are just examples, if you remove those line it should just work fine :)

meteora8888 commented 5 years ago

Thank you. That's great . Didn't realize that I was actually failing it myself ;D Sorry I sometimes look so deep that I don't see on the surfase. You helped me a lot thanks.